Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,16 @@
|
|
1 |
import spaces
|
2 |
-
from transformers import pipeline
|
3 |
import gradio as gr
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0')
|
8 |
|
|
|
1 |
import spaces
|
|
|
2 |
import gradio as gr
|
3 |
+
import transformers
|
4 |
+
from transformers import AutoTokenizer
|
5 |
+
from transformers import pipeline
|
6 |
+
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")
|
8 |
+
|
9 |
+
model = transformers.AutoModelForCausalLM.from_pretrained(
|
10 |
+
'mosaicml/mpt-7b-instruct',
|
11 |
+
trust_remote_code=True
|
12 |
+
)
|
13 |
+
|
14 |
|
15 |
pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0')
|
16 |
|