Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -95,6 +95,7 @@ if st.button("π² Pick Random Question"):
|
|
95 |
|
96 |
default_prompt = "Jasper has 5 apples and eats 2 of them. How many apples does he have left?"
|
97 |
selected_question = gsm8k_data[question_index]["question"] if question_index is not None else default_prompt
|
|
|
98 |
|
99 |
|
100 |
# Prompt options
|
@@ -137,7 +138,10 @@ if st.button("Generate Response", key="manual"):
|
|
137 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
138 |
response_only = generated_text[len(input_text):].strip() if generated_text.startswith(input_text) else generated_text.strip()
|
139 |
|
140 |
-
st.
|
141 |
-
|
|
|
142 |
st.subheader("π§ Model Output")
|
143 |
st.success(response_only)
|
|
|
|
|
|
95 |
|
96 |
default_prompt = "Jasper has 5 apples and eats 2 of them. How many apples does he have left?"
|
97 |
selected_question = gsm8k_data[question_index]["question"] if question_index is not None else default_prompt
|
98 |
+
correct_answer = gsm8k_data[question_index]["answer"]
|
99 |
|
100 |
|
101 |
# Prompt options
|
|
|
138 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
139 |
response_only = generated_text[len(input_text):].strip() if generated_text.startswith(input_text) else generated_text.strip()
|
140 |
|
141 |
+
with st.expander("π Prompt"):
|
142 |
+
st.subheader("π Prompt")
|
143 |
+
st.write(input_text)
|
144 |
st.subheader("π§ Model Output")
|
145 |
st.success(response_only)
|
146 |
+
st.subheader("β
Correct Answer (GSM8K)")
|
147 |
+
st.info(correct_answer)
|