Omnibus commited on
Commit
e6696c2
1 Parent(s): 3649895

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -1,8 +1,16 @@
1
  import spaces
2
- from transformers import pipeline
3
  import gradio as gr
4
- model = 'mosaicml/mpt-7b-instruct'
5
- tokenizer = 'mosaicml/mpt-7b-instruct'
 
 
 
 
 
 
 
 
 
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