pratyushmaini commited on
Commit
f545f9a
·
1 Parent(s): c2e936a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -24
app.py CHANGED
@@ -47,7 +47,7 @@ def respond(message, history, system_message, max_tokens, temperature, top_p, se
47
  print(f"Error calling model API: {e}")
48
  yield f"Sorry, there was an error: {str(e)}"
49
 
50
- # Custom CSS for branding with consistent styling
51
  css = """
52
  @import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700&display=swap');
53
 
@@ -160,23 +160,29 @@ button:hover, .gradio-button:hover {
160
  border-radius: 8px !important;
161
  background-color: #ffffff !important;
162
  }
163
- /* Footer hiding */
164
- .footer, #footer, .gradio-footer, #component-38, #component-39 {
165
  display: none !important;
166
- visibility: hidden !important;
167
- height: 0 !important;
168
- width: 0 !important;
169
- margin: 0 !important;
170
- padding: 0 !important;
171
- opacity: 0 !important;
172
  }
173
- /* Hide Gradio branding */
174
- .gradio-container > div:last-child {
175
  display: none !important;
176
  }
177
- .gradio-container .footer-logo, .gradio-container footer {
178
  display: none !important;
179
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
 
182
  """
@@ -310,15 +316,5 @@ with gr.Blocks(css=css) as demo:
310
  clear_button.click(clear_history, None, chatbot, queue=False)
311
 
312
  if __name__ == "__main__":
313
- # Launch with custom footer_html to remove the "Built with Gradio" text
314
- demo.launch(
315
- show_api=False, # Hide the API button
316
- share=False, # Don't create a public link
317
- debug=False, # Hide debug info
318
- show_error=True,
319
- favicon_path=None,
320
- height="auto",
321
- width="100%",
322
- # Empty footer to hide "Built with Gradio"
323
- footer_html=""
324
- )
 
47
  print(f"Error calling model API: {e}")
48
  yield f"Sorry, there was an error: {str(e)}"
49
 
50
+ # Custom CSS for branding with consistent styling and hiding footer
51
  css = """
52
  @import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700&display=swap');
53
 
 
160
  border-radius: 8px !important;
161
  background-color: #ffffff !important;
162
  }
163
+ /* Hide Gradio branding and footer */
164
+ footer, .footer {
165
  display: none !important;
 
 
 
 
 
 
166
  }
167
+ .gradio-footer {
 
168
  display: none !important;
169
  }
170
+ .gradio-container .footer {
171
  display: none !important;
172
  }
173
+ .gradio-container .footer-logo {
174
+ display: none !important;
175
+ }
176
+ div.gradio-footer {
177
+ display: none !important;
178
+ }
179
+ .footer-message {
180
+ display: none !important;
181
+ }
182
+ button[aria-label="Use via API"] {
183
+ display: none !important;
184
+ }
185
+
186
 
187
 
188
  """
 
316
  clear_button.click(clear_history, None, chatbot, queue=False)
317
 
318
  if __name__ == "__main__":
319
+ # Simple launch without parameters that might not be supported
320
+ demo.launch()