Tonic commited on
Commit
4df759f
·
1 Parent(s): 664a2c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -13
app.py CHANGED
@@ -1,14 +1,4 @@
1
- import optimum
2
- import transformers
3
- from transformers import AutoConfig, AutoTokenizer, AutoModel, AutoModelForCausalLM
4
-
5
- import torch
6
- import gradio as gr
7
- import json
8
- import os
9
- import shutil
10
- import requests
11
-
12
 
13
  title = "👋🏻Welcome to Tonic's 💫🌠Starling 7B"
14
  description = "You can use [💫🌠Starling 7B](https://huggingface.co/berkeley-nest/Starling-LM-7B-alpha) or duplicate it for local use or on Hugging Face! [Join me on Discord to build together](https://discord.gg/VqTxc76K3u)."
@@ -23,7 +13,15 @@ examples = [
23
  ]
24
  ]
25
 
26
- model_name = "berkeley-nest/Starling-LM-7B-alpha"
 
 
 
 
 
 
 
 
27
 
28
  device = "cuda" if torch.cuda.is_available() else "cpu"
29
  temperature=0.4
@@ -31,7 +29,6 @@ max_new_tokens=240
31
  top_p=0.92
32
  repetition_penalty=1.7
33
 
34
-
35
  tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
36
  model = transformers.AutoModelForCausalLM.from_pretrained(model_name,
37
  device_map="auto",
 
1
+ model_name = "berkeley-nest/Starling-LM-7B-alpha"
 
 
 
 
 
 
 
 
 
 
2
 
3
  title = "👋🏻Welcome to Tonic's 💫🌠Starling 7B"
4
  description = "You can use [💫🌠Starling 7B](https://huggingface.co/berkeley-nest/Starling-LM-7B-alpha) or duplicate it for local use or on Hugging Face! [Join me on Discord to build together](https://discord.gg/VqTxc76K3u)."
 
13
  ]
14
  ]
15
 
16
+
17
+ import transformers
18
+ from transformers import AutoConfig, AutoTokenizer, AutoModel, AutoModelForCausalLM
19
+ import torch
20
+ import gradio as gr
21
+ import json
22
+ import os
23
+ import shutil
24
+ import requests
25
 
26
  device = "cuda" if torch.cuda.is_available() else "cpu"
27
  temperature=0.4
 
29
  top_p=0.92
30
  repetition_penalty=1.7
31
 
 
32
  tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
33
  model = transformers.AutoModelForCausalLM.from_pretrained(model_name,
34
  device_map="auto",