Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
|
9 |
|
10 |
@st.cache(hash_funcs={tokenizers.Tokenizer: lambda _: None, tokenizers.AddedToken: lambda _: None, re.Pattern: lambda _: None}, allow_output_mutation=True, suppress_st_warning=True)
|
11 |
-
def get_model(model_name, model_path):
|
12 |
tokenizer = transformers.GPT2Tokenizer.from_pretrained(model_name)
|
13 |
model = transformers.OPTForCausalLM.from_pretrained('big-kek/NeuroSkeptic', device_map='cpu')
|
14 |
|
|
|
8 |
|
9 |
|
10 |
@st.cache(hash_funcs={tokenizers.Tokenizer: lambda _: None, tokenizers.AddedToken: lambda _: None, re.Pattern: lambda _: None}, allow_output_mutation=True, suppress_st_warning=True)
|
11 |
+
def get_model(model_name, model_path='pytorch_model.bin'):
|
12 |
tokenizer = transformers.GPT2Tokenizer.from_pretrained(model_name)
|
13 |
model = transformers.OPTForCausalLM.from_pretrained('big-kek/NeuroSkeptic', device_map='cpu')
|
14 |
|