Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,6 +49,10 @@ def set_topic(topic):
|
|
| 49 |
chosen_topic = topic
|
| 50 |
return f"✅ Great! You've chosen **{topic}**. Let's start your study session."
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
def respond(message, history):
|
|
@@ -124,8 +128,11 @@ with gr.Blocks() as demo:
|
|
| 124 |
exam_output = gr.Markdown()
|
| 125 |
|
| 126 |
chatbot = gr.ChatInterface(respond, type="messages", title="ACE it!")
|
|
|
|
| 127 |
|
| 128 |
topic_button.click(set_topic, inputs=topic_dropdown, outputs=topic_output)
|
|
|
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
|
|
|
|
| 49 |
chosen_topic = topic
|
| 50 |
return f"✅ Great! You've chosen **{topic}**. Let's start your study session."
|
| 51 |
|
| 52 |
+
def set_mode(mode):
|
| 53 |
+
return f"You have selected **{mode}** mode."
|
| 54 |
+
|
| 55 |
+
|
| 56 |
|
| 57 |
|
| 58 |
def respond(message, history):
|
|
|
|
| 128 |
exam_output = gr.Markdown()
|
| 129 |
|
| 130 |
chatbot = gr.ChatInterface(respond, type="messages", title="ACE it!")
|
| 131 |
+
|
| 132 |
|
| 133 |
topic_button.click(set_topic, inputs=topic_dropdown, outputs=topic_output)
|
| 134 |
+
exam_button.click(set_mode, inputs=exam_dropdown, outputs=exam_output)
|
| 135 |
+
|
| 136 |
|
| 137 |
|
| 138 |
|