Spaces:
Runtime error
Runtime error
jacklindsai
commited on
Commit
•
2f41f9f
1
Parent(s):
c91b0a0
Updated the model path
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
import torch
|
4 |
import numpy as np
|
5 |
|
6 |
tokenizer = torch.hub.load('huggingface/pytorch-transformers', 'tokenizer', 'bert-base-cased-finetuned-mrpc')
|
7 |
-
model = AutoModel.from_pretrained("jacklindsai/is_it_elon_musk
|
8 |
|
9 |
def preprocess_text(text):
|
10 |
return tokenizer.encode_plus(text, truncation=True, padding='max_length', max_length=48, return_attention_mask=True)
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoModel
|
3 |
import torch
|
4 |
import numpy as np
|
5 |
|
6 |
tokenizer = torch.hub.load('huggingface/pytorch-transformers', 'tokenizer', 'bert-base-cased-finetuned-mrpc')
|
7 |
+
model = AutoModel.from_pretrained("jacklindsai/is_it_elon_musk")
|
8 |
|
9 |
def preprocess_text(text):
|
10 |
return tokenizer.encode_plus(text, truncation=True, padding='max_length', max_length=48, return_attention_mask=True)
|