Dave67350 commited on
Commit
5d9338d
·
verified ·
1 Parent(s): f15da98

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +9 -12
Gradio_UI.py CHANGED
@@ -91,30 +91,28 @@ def continue_conversation(user_input):
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>
114
  """)
115
 
116
- gr.Markdown("## 📑 Regulation Document Generator")
117
-
118
  with gr.Row():
119
  reg_dropdown = gr.Dropdown(
120
  choices=list(DOCUMENT_TO_MODULE.keys()),
@@ -147,5 +145,4 @@ with gr.Blocks(title="Regulatory Compliance Generator") as demo:
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)
 
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
+ """)
101
 
102
+ # Custom CSS to hide Gradio/HF UI elements
103
  gr.HTML("""
104
  <style>
105
  footer,
106
+ .absolute.bottom-4.right-4,
107
+ a[href*="gradio.app"],
108
+ a[href*="huggingface.co"],
109
+ .svelte-drgfjz[data-testid="clear-button"],
110
+ .svelte-1ipelgc[data-testid="block-settings-button"] {
111
  display: none !important;
112
  }
113
  </style>
114
  """)
115
 
 
 
116
  with gr.Row():
117
  reg_dropdown = gr.Dropdown(
118
  choices=list(DOCUMENT_TO_MODULE.keys()),
 
145
  user_input.submit(continue_conversation, inputs=user_input, outputs=[chatbox, pdf_output])
146
  user_input.submit(lambda: "", None, user_input)
147
 
148
+ demo.launch()