Spaces:
Running
Running
Update tools/ai_act_generator.py
Browse files- tools/ai_act_generator.py +15 -0
tools/ai_act_generator.py
CHANGED
|
@@ -168,6 +168,19 @@ Generated by AI Act Assistant.
|
|
| 168 |
# === UI for Step-by-Step Form ===
|
| 169 |
def launch_step_by_step_ui():
|
| 170 |
with gr.Blocks(fill_height=True) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
initial_question = QUESTIONS[0][1]
|
| 172 |
initial_message = gr.ChatMessage(role="assistant", content="""
|
| 173 |
👋 Welcome! I will guide you through the AI Act compliance form.
|
|
@@ -175,6 +188,8 @@ Let's begin with a few questions to generate your compliance register.
|
|
| 175 |
|
| 176 |
What is the name of your organization?
|
| 177 |
""")
|
|
|
|
|
|
|
| 178 |
stored_messages = [initial_message]
|
| 179 |
chatbot = gr.Chatbot(type="messages", value=stored_messages)
|
| 180 |
msg = gr.Textbox(label="Your answer")
|
|
|
|
| 168 |
# === UI for Step-by-Step Form ===
|
| 169 |
def launch_step_by_step_ui():
|
| 170 |
with gr.Blocks(fill_height=True) as demo:
|
| 171 |
+
gr.HTML("""
|
| 172 |
+
<style>
|
| 173 |
+
footer,
|
| 174 |
+
.absolute.bottom-4.right-4,
|
| 175 |
+
a[href*="gradio.app"],
|
| 176 |
+
a[href*="huggingface.co"],
|
| 177 |
+
.svelte-drgfjz[data-testid="clear-button"],
|
| 178 |
+
.svelte-1ipelgc[data-testid="block-settings-button"] {
|
| 179 |
+
display: none !important;
|
| 180 |
+
}
|
| 181 |
+
</style>
|
| 182 |
+
""")
|
| 183 |
+
|
| 184 |
initial_question = QUESTIONS[0][1]
|
| 185 |
initial_message = gr.ChatMessage(role="assistant", content="""
|
| 186 |
👋 Welcome! I will guide you through the AI Act compliance form.
|
|
|
|
| 188 |
|
| 189 |
What is the name of your organization?
|
| 190 |
""")
|
| 191 |
+
...
|
| 192 |
+
|
| 193 |
stored_messages = [initial_message]
|
| 194 |
chatbot = gr.Chatbot(type="messages", value=stored_messages)
|
| 195 |
msg = gr.Textbox(label="Your answer")
|