Spaces:
Runtime error
Runtime error
ADD: caching of models 2
Browse files
app.py
CHANGED
@@ -6,10 +6,6 @@ import torch
|
|
6 |
TOP_N = 5
|
7 |
|
8 |
def main():
|
9 |
-
print("cur_model", cur_model_name)
|
10 |
-
|
11 |
-
tokenizer = AutoTokenizer.from_pretrained(cur_model_name)
|
12 |
-
model = AutoModelForSequenceClassification.from_pretrained(cur_model_name)
|
13 |
|
14 |
st.set_page_config( # Alternate names: setup_page, page, layout
|
15 |
layout="centered", # Can be "centered" or "wide". In the future also "dashboard", etc.
|
@@ -77,7 +73,7 @@ def main():
|
|
77 |
# Define function to run when submit is clicked
|
78 |
def submit(message):
|
79 |
if len(message) > 0:
|
80 |
-
st.header(get_top_emojis(message
|
81 |
else:
|
82 |
st.error("The text can't be empty")
|
83 |
|
|
|
6 |
TOP_N = 5
|
7 |
|
8 |
def main():
|
|
|
|
|
|
|
|
|
9 |
|
10 |
st.set_page_config( # Alternate names: setup_page, page, layout
|
11 |
layout="centered", # Can be "centered" or "wide". In the future also "dashboard", etc.
|
|
|
73 |
# Define function to run when submit is clicked
|
74 |
def submit(message):
|
75 |
if len(message) > 0:
|
76 |
+
st.header(get_top_emojis(message))
|
77 |
else:
|
78 |
st.error("The text can't be empty")
|
79 |
|