Spaces:
Sleeping
Sleeping
JosueElias
commited on
Commit
·
c64061d
1
Parent(s):
b50e558
Adding reset button.
Browse files
app.py
CHANGED
@@ -49,16 +49,23 @@ try:
|
|
49 |
st.markdown(multi)
|
50 |
|
51 |
try:
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
if st.button('Ask for answer'):
|
56 |
st.write('The answer is:')
|
57 |
answer = pipeline.give_the_best_answer(mi_dict)
|
58 |
-
st.write(
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
except Exception as e:
|
61 |
-
st.error("Something bad happend while trying to infer the answer.")
|
62 |
st.error(e)
|
63 |
|
64 |
except Exception as e:
|
|
|
49 |
st.markdown(multi)
|
50 |
|
51 |
try:
|
52 |
+
st.button("Example", type="primary")
|
|
|
|
|
53 |
if st.button('Ask for answer'):
|
54 |
st.write('The answer is:')
|
55 |
answer = pipeline.give_the_best_answer(mi_dict)
|
56 |
+
st.write(answer)
|
57 |
+
else:
|
58 |
+
mi_dict= {
|
59 |
+
"prompt":"What is color?",
|
60 |
+
"A": "Is a name.",
|
61 |
+
"B":"Is something horrible.",
|
62 |
+
"C":"I don't know.",
|
63 |
+
"D":"You should ask someone else.",
|
64 |
+
"E":"Ask in a pyshic book."
|
65 |
+
}
|
66 |
+
|
67 |
except Exception as e:
|
68 |
+
st.error("Something bad happend while trying to infer the answer or with the buttons.")
|
69 |
st.error(e)
|
70 |
|
71 |
except Exception as e:
|