Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,6 @@ import requests
|
|
| 7 |
import tempfile
|
| 8 |
|
| 9 |
import gradio as gr
|
| 10 |
-
import pandas as pd
|
| 11 |
from huggingface_hub import HfApi, hf_hub_download
|
| 12 |
|
| 13 |
# ---------- CONFIG ----------
|
|
@@ -187,8 +186,8 @@ with gr.Blocks() as demo:
|
|
| 187 |
gen_btn.click(on_generate, inputs=[name_in, email_in, subject_in, grade_in, brief_in], outputs=generated_out)
|
| 188 |
save_btn.click(on_save, inputs=[name_in, email_in, subject_in, grade_in, brief_in, generated_out], outputs=status)
|
| 189 |
|
| 190 |
-
|
| 191 |
-
|
| 192 |
|
| 193 |
# Student tab
|
| 194 |
with gr.TabItem("Student"):
|
|
@@ -264,4 +263,4 @@ with gr.Blocks() as demo:
|
|
| 264 |
get_hint_btn.click(generate_hint, inputs=rough_input, outputs=hint_output)
|
| 265 |
|
| 266 |
if __name__ == "__main__":
|
| 267 |
-
demo.launch()
|
|
|
|
| 7 |
import tempfile
|
| 8 |
|
| 9 |
import gradio as gr
|
|
|
|
| 10 |
from huggingface_hub import HfApi, hf_hub_download
|
| 11 |
|
| 12 |
# ---------- CONFIG ----------
|
|
|
|
| 186 |
gen_btn.click(on_generate, inputs=[name_in, email_in, subject_in, grade_in, brief_in], outputs=generated_out)
|
| 187 |
save_btn.click(on_save, inputs=[name_in, email_in, subject_in, grade_in, brief_in, generated_out], outputs=status)
|
| 188 |
|
| 189 |
+
timer = gr.Timer(interval=10)
|
| 190 |
+
timer.tick(update_teacher_results, outputs=results_out)
|
| 191 |
|
| 192 |
# Student tab
|
| 193 |
with gr.TabItem("Student"):
|
|
|
|
| 263 |
get_hint_btn.click(generate_hint, inputs=rough_input, outputs=hint_output)
|
| 264 |
|
| 265 |
if __name__ == "__main__":
|
| 266 |
+
demo.launch()
|