Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
3 |
import numpy as np
|
4 |
import torch
|
5 |
|
|
|
6 |
|
7 |
def preprocess(text):
|
8 |
new_text = []
|
@@ -53,7 +54,6 @@ def main():
|
|
53 |
models_to_choose = ["AlekseyDorkin/xlm-roberta-en-ru-emoji"]
|
54 |
|
55 |
BASE_MODEL = st.selectbox("Choose a model", models_to_choose)
|
56 |
-
TOP_N = 5
|
57 |
|
58 |
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
|
59 |
model = AutoModelForSequenceClassification.from_pretrained(BASE_MODEL)
|
|
|
3 |
import numpy as np
|
4 |
import torch
|
5 |
|
6 |
+
TOP_N = 5
|
7 |
|
8 |
def preprocess(text):
|
9 |
new_text = []
|
|
|
54 |
models_to_choose = ["AlekseyDorkin/xlm-roberta-en-ru-emoji"]
|
55 |
|
56 |
BASE_MODEL = st.selectbox("Choose a model", models_to_choose)
|
|
|
57 |
|
58 |
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
|
59 |
model = AutoModelForSequenceClassification.from_pretrained(BASE_MODEL)
|