Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,12 +44,12 @@ My favorite part of the book though was when the hobbits met Tom Bombadil, it's
|
|
44 |
data=input_data,
|
45 |
headers=headers).json()
|
46 |
|
47 |
-
|
48 |
-
st.write(r)
|
49 |
-
continue
|
50 |
-
else:
|
51 |
r=r[0]
|
52 |
-
|
|
|
|
|
|
|
53 |
label, score = convert_dict[r['label']], r['score']
|
54 |
|
55 |
st.write(f"**Model Name**: {model_name}")
|
|
|
44 |
data=input_data,
|
45 |
headers=headers).json()
|
46 |
|
47 |
+
try:
|
|
|
|
|
|
|
48 |
r=r[0]
|
49 |
+
except:
|
50 |
+
st.write("Model loading timed out. Please enter the text again.")
|
51 |
+
continue
|
52 |
+
|
53 |
label, score = convert_dict[r['label']], r['score']
|
54 |
|
55 |
st.write(f"**Model Name**: {model_name}")
|