Dave67350 commited on
Commit
3804379
·
verified ·
1 Parent(s): df8e74e

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +12 -24
Gradio_UI.py CHANGED
@@ -90,14 +90,22 @@ def continue_conversation(user_input):
90
  return messages, pdf_path
91
 
92
  # === Gradio Interface ===
93
- with gr.Blocks(title="Regulatory Compliance Generator", css="""
 
 
94
  footer,
95
  a[href*="gradio.app"],
96
  a[href*="huggingface.co"],
97
- button[aria-label="Share"] {
 
 
 
 
 
98
  display: none !important;
99
  }
100
- """) as demo:
 
101
  # GDPR Notice
102
  gr.Markdown("""
103
  ### 🔒 GDPR Notice
@@ -105,26 +113,6 @@ with gr.Blocks(title="Regulatory Compliance Generator", css="""
105
  All responses are processed temporarily to generate your document.
106
  You are responsible for the accuracy and legality of the information submitted.
107
  """)
108
-
109
- # 🔒 Hide share button & links
110
- gr.HTML("""
111
- <style>
112
- footer,
113
- a[href*="gradio.app"],
114
- a[href*="huggingface.co"],
115
- button[aria-label="Share"],
116
- button[title="Share"],
117
- button[data-testid="share-button"],
118
- .svelte-1ipelgc[data-testid="block-settings-button"],
119
- .svelte-drgfjz[data-testid="share-button"],
120
- .svelte-drgfjz svg path[d^="M15 8a3"] { /* Specific SVG icon path targeting */
121
- display: none !important;
122
- }
123
- </style>
124
- """)
125
-
126
-
127
-
128
 
129
  with gr.Row():
130
  reg_dropdown = gr.Dropdown(
@@ -150,7 +138,7 @@ with gr.Blocks(title="Regulatory Compliance Generator", css="""
150
  reg_dropdown.change(update_doc_dropdown, inputs=reg_dropdown, outputs=doc_dropdown)
151
 
152
  start_btn = gr.Button("🚀 Start")
153
- chatbox = gr.Chatbot(label="🧑‍⚖️ Legalbot", value=[], type="messages")
154
  user_input = gr.Textbox(label="Your answer", placeholder="Type your answer and press Enter")
155
  pdf_output = gr.File(label="Download PDF", visible=True)
156
 
 
90
  return messages, pdf_path
91
 
92
  # === Gradio Interface ===
93
+ with gr.Blocks(
94
+ title="Regulatory Compliance Generator",
95
+ css="""
96
  footer,
97
  a[href*="gradio.app"],
98
  a[href*="huggingface.co"],
99
+ button[aria-label="Share"],
100
+ button[title="Share"],
101
+ button[data-testid="share-button"],
102
+ .svelte-drgfjz[data-testid="share-button"],
103
+ .svelte-drgfjz svg path[d^="M15 8a3"],
104
+ .chatbot button[data-testid="share-button"] {
105
  display: none !important;
106
  }
107
+ """
108
+ ) as demo:
109
  # GDPR Notice
110
  gr.Markdown("""
111
  ### 🔒 GDPR Notice
 
113
  All responses are processed temporarily to generate your document.
114
  You are responsible for the accuracy and legality of the information submitted.
115
  """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  with gr.Row():
118
  reg_dropdown = gr.Dropdown(
 
138
  reg_dropdown.change(update_doc_dropdown, inputs=reg_dropdown, outputs=doc_dropdown)
139
 
140
  start_btn = gr.Button("🚀 Start")
141
+ chatbox = gr.Chatbot(label="🧑‍⚖️ Legalbot", value=[], type="messages", elem_classes=["chatbot"])
142
  user_input = gr.Textbox(label="Your answer", placeholder="Type your answer and press Enter")
143
  pdf_output = gr.File(label="Download PDF", visible=True)
144