Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- Gradio_UI.py +3 -3
Gradio_UI.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#!/usr/bin/env python
|
| 2 |
# coding=utf-8
|
| 3 |
import mimetypes
|
| 4 |
import os
|
|
@@ -68,7 +68,7 @@ def step_by_step_agent(user_input, state):
|
|
| 68 |
if step < len(QUESTIONS):
|
| 69 |
next_question = QUESTIONS[step][1]
|
| 70 |
state["step"] += 1
|
| 71 |
-
return next_question, state, None
|
| 72 |
|
| 73 |
filled_template = f"""
|
| 74 |
# AI Act Compliance Register
|
|
@@ -121,7 +121,7 @@ import datetime
|
|
| 121 |
|
| 122 |
pdf_path = export_text_to_pdf(filled_template, language=detected_lang)
|
| 123 |
return f"{flag} Language detected: {detected_lang.upper()}
|
| 124 |
-
✅ All answers received. Download your AI Act compliance PDF below.", {"done": True, "pdf": pdf_path}
|
| 125 |
|
| 126 |
# === UI for Step-by-Step Form ===
|
| 127 |
def launch_step_by_step_ui():
|
|
|
|
| 1 |
+
c#!/usr/bin/env python
|
| 2 |
# coding=utf-8
|
| 3 |
import mimetypes
|
| 4 |
import os
|
|
|
|
| 68 |
if step < len(QUESTIONS):
|
| 69 |
next_question = QUESTIONS[step][1]
|
| 70 |
state["step"] += 1
|
| 71 |
+
return next_question, state, None # Ensure return matches expected 3 outputs
|
| 72 |
|
| 73 |
filled_template = f"""
|
| 74 |
# AI Act Compliance Register
|
|
|
|
| 121 |
|
| 122 |
pdf_path = export_text_to_pdf(filled_template, language=detected_lang)
|
| 123 |
return f"{flag} Language detected: {detected_lang.upper()}
|
| 124 |
+
✅ All answers received. Download your AI Act compliance PDF below.", {"done": True, "pdf": pdf_path}, pdf_path
|
| 125 |
|
| 126 |
# === UI for Step-by-Step Form ===
|
| 127 |
def launch_step_by_step_ui():
|