Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- Gradio_UI.py +13 -8
Gradio_UI.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#
|
| 2 |
import gradio as gr
|
| 3 |
from fpdf import FPDF
|
| 4 |
from langdetect import detect
|
|
@@ -91,19 +91,23 @@ def continue_conversation(user_input):
|
|
| 91 |
|
| 92 |
# === Gradio Interface ===
|
| 93 |
with gr.Blocks(title="Regulatory Compliance Generator") as demo:
|
| 94 |
-
# GDPR
|
| 95 |
gr.Markdown("""
|
| 96 |
### 🔒 GDPR Notice
|
| 97 |
-
This assistant does not store any personal data.
|
| 98 |
-
|
| 99 |
-
|
|
|
|
| 100 |
|
| 101 |
-
#
|
| 102 |
gr.HTML("""
|
| 103 |
<style>
|
| 104 |
-
footer,
|
|
|
|
| 105 |
.prose a[href*="gradio.app"],
|
| 106 |
-
.prose a[href*="
|
|
|
|
|
|
|
| 107 |
display: none !important;
|
| 108 |
}
|
| 109 |
</style>
|
|
@@ -143,4 +147,5 @@ with gr.Blocks(title="Regulatory Compliance Generator") as demo:
|
|
| 143 |
user_input.submit(continue_conversation, inputs=user_input, outputs=[chatbox, pdf_output])
|
| 144 |
user_input.submit(lambda: "", None, user_input)
|
| 145 |
|
|
|
|
| 146 |
demo.launch(show_api=False)
|
|
|
|
| 1 |
+
# gradio_UI.py
|
| 2 |
import gradio as gr
|
| 3 |
from fpdf import FPDF
|
| 4 |
from langdetect import detect
|
|
|
|
| 91 |
|
| 92 |
# === Gradio Interface ===
|
| 93 |
with gr.Blocks(title="Regulatory Compliance Generator") as demo:
|
| 94 |
+
# GDPR notice
|
| 95 |
gr.Markdown("""
|
| 96 |
### 🔒 GDPR Notice
|
| 97 |
+
This assistant does not store any personal data.
|
| 98 |
+
All responses are processed temporarily to generate your document.
|
| 99 |
+
You are responsible for the accuracy and legality of the information submitted.
|
| 100 |
+
""", elem_id="gdpr-notice")
|
| 101 |
|
| 102 |
+
# Remove footer, "Built with Gradio", and "View app"
|
| 103 |
gr.HTML("""
|
| 104 |
<style>
|
| 105 |
+
footer,
|
| 106 |
+
.svelte-1ipelgc[data-testid="block-settings-button"],
|
| 107 |
.prose a[href*="gradio.app"],
|
| 108 |
+
.prose a[href*="huggingface.co"],
|
| 109 |
+
.prose a[href*="huggingface.co"] + div,
|
| 110 |
+
.absolute.bottom-4.right-4 {
|
| 111 |
display: none !important;
|
| 112 |
}
|
| 113 |
</style>
|
|
|
|
| 147 |
user_input.submit(continue_conversation, inputs=user_input, outputs=[chatbox, pdf_output])
|
| 148 |
user_input.submit(lambda: "", None, user_input)
|
| 149 |
|
| 150 |
+
# Launch without API/docs
|
| 151 |
demo.launch(show_api=False)
|