Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1396,6 +1396,7 @@ def create_interface():
|
|
1396 |
gr.update(elem_classes="completed-tab"),
|
1397 |
gr.update(interactive=True),
|
1398 |
gr.update(visible=False)
|
|
|
1399 |
except Exception as e:
|
1400 |
logging.error(f"Upload error: {str(e)}")
|
1401 |
return (
|
@@ -1404,7 +1405,8 @@ def create_interface():
|
|
1404 |
current_tab_status,
|
1405 |
gr.update(),
|
1406 |
gr.update(),
|
1407 |
-
gr.update(visible=True, value=f"<div class='nav-message'>Error: {str(e)}</div>")
|
|
|
1408 |
|
1409 |
upload_btn.click(
|
1410 |
fn=process_transcript_and_update,
|
@@ -1468,7 +1470,7 @@ def create_interface():
|
|
1468 |
gr.update(elem_classes="completed-tab"),
|
1469 |
gr.update(interactive=True),
|
1470 |
gr.update(value="<div class='alert-box'>Quiz submitted successfully! Scroll down to view your results.</div>", visible=True),
|
1471 |
-
gr.update(visible=False)
|
1472 |
except Exception as e:
|
1473 |
logging.error(f"Quiz error: {str(e)}")
|
1474 |
return (
|
@@ -1783,4 +1785,3 @@ app = create_interface()
|
|
1783 |
# For Hugging Face Spaces deployment
|
1784 |
if __name__ == "__main__":
|
1785 |
app.launch()
|
1786 |
-
|
|
|
1396 |
gr.update(elem_classes="completed-tab"),
|
1397 |
gr.update(interactive=True),
|
1398 |
gr.update(visible=False)
|
1399 |
+
)
|
1400 |
except Exception as e:
|
1401 |
logging.error(f"Upload error: {str(e)}")
|
1402 |
return (
|
|
|
1405 |
current_tab_status,
|
1406 |
gr.update(),
|
1407 |
gr.update(),
|
1408 |
+
gr.update(visible=True, value=f"<div class='nav-message'>Error: {str(e)}</div>")
|
1409 |
+
)
|
1410 |
|
1411 |
upload_btn.click(
|
1412 |
fn=process_transcript_and_update,
|
|
|
1470 |
gr.update(elem_classes="completed-tab"),
|
1471 |
gr.update(interactive=True),
|
1472 |
gr.update(value="<div class='alert-box'>Quiz submitted successfully! Scroll down to view your results.</div>", visible=True),
|
1473 |
+
gr.update(visible=False)
|
1474 |
except Exception as e:
|
1475 |
logging.error(f"Quiz error: {str(e)}")
|
1476 |
return (
|
|
|
1785 |
# For Hugging Face Spaces deployment
|
1786 |
if __name__ == "__main__":
|
1787 |
app.launch()
|
|