Spaces:
Sleeping
Sleeping
Commit
·
3cc3c6a
1
Parent(s):
c64061d
Adding format to answer.
Browse files
app.py
CHANGED
@@ -49,20 +49,11 @@ try:
|
|
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 |
-
|
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.")
|
|
|
49 |
st.markdown(multi)
|
50 |
|
51 |
try:
|
|
|
52 |
if st.button('Ask for answer'):
|
53 |
st.write('The answer is:')
|
54 |
answer = pipeline.give_the_best_answer(mi_dict)
|
55 |
+
st.write(f"The correct answer is {answer}: {mi_dict[answer]}")
|
56 |
+
st.balloons()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
except Exception as e:
|
59 |
st.error("Something bad happend while trying to infer the answer or with the buttons.")
|