Spaces:
Runtime error
Runtime error
Galuh Sahid
commited on
Commit
•
54dbc81
1
Parent(s):
7c82098
fix reloading
Browse files
app.py
CHANGED
@@ -109,17 +109,13 @@ prompt = st.selectbox('Prompt', ALL_PROMPTS, index=len(ALL_PROMPTS)-1)
|
|
109 |
session_state = SessionState.get(prompt_box=None)
|
110 |
|
111 |
if prompt == "Custom":
|
112 |
-
prompt_box = "Enter your text here"
|
113 |
else:
|
114 |
-
prompt_box = random.choice(PROMPT_LIST[prompt_group_name][prompt])
|
115 |
-
|
116 |
-
session_state.prompt_box = prompt_box
|
117 |
|
118 |
text = st.text_area("Enter text", session_state.prompt_box)
|
119 |
|
120 |
if st.button("Run"):
|
121 |
-
text = st.text_area("Enter text", session_state.prompt_box)
|
122 |
-
|
123 |
with st.spinner(text="Getting results..."):
|
124 |
lang_predictions, lang_probability = ft_model.predict(text.replace("\n", " "), k=3)
|
125 |
if "__label__id" in lang_predictions:
|
|
|
109 |
session_state = SessionState.get(prompt_box=None)
|
110 |
|
111 |
if prompt == "Custom":
|
112 |
+
session_state.prompt_box = "Enter your text here"
|
113 |
else:
|
114 |
+
session_state.prompt_box = random.choice(PROMPT_LIST[prompt_group_name][prompt])
|
|
|
|
|
115 |
|
116 |
text = st.text_area("Enter text", session_state.prompt_box)
|
117 |
|
118 |
if st.button("Run"):
|
|
|
|
|
119 |
with st.spinner(text="Getting results..."):
|
120 |
lang_predictions, lang_probability = ft_model.predict(text.replace("\n", " "), k=3)
|
121 |
if "__label__id" in lang_predictions:
|