Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,6 @@ import tokenizers
|
|
4 |
import gradio as gr
|
5 |
import re
|
6 |
|
7 |
-
from PIL import Image
|
8 |
-
|
9 |
-
|
10 |
def get_model(model_name, model_path='pytorch_model.bin'):
|
11 |
tokenizer = transformers.GPT2Tokenizer.from_pretrained(model_name)
|
12 |
model = transformers.OPTForCausalLM.from_pretrained(model_name)
|
@@ -33,7 +30,7 @@ def predict(text, model, tokenizer, n_beams=5, temperature=2.5, top_p=0.8, lengt
|
|
33 |
return list(map(tokenizer.decode, out))[0]
|
34 |
|
35 |
|
36 |
-
model, tokenizer = get_model('big-kek/NeuroSkeptic', '
|
37 |
|
38 |
example = 'Who is Bill Gates really?'
|
39 |
demo = gr.Interface(
|
|
|
4 |
import gradio as gr
|
5 |
import re
|
6 |
|
|
|
|
|
|
|
7 |
def get_model(model_name, model_path='pytorch_model.bin'):
|
8 |
tokenizer = transformers.GPT2Tokenizer.from_pretrained(model_name)
|
9 |
model = transformers.OPTForCausalLM.from_pretrained(model_name)
|
|
|
30 |
return list(map(tokenizer.decode, out))[0]
|
31 |
|
32 |
|
33 |
+
model, tokenizer = get_model('big-kek/NeuroSkeptic', 'OPT13b-skeptic.bin')
|
34 |
|
35 |
example = 'Who is Bill Gates really?'
|
36 |
demo = gr.Interface(
|