Abdalkaderdev commited on
Commit
347ee82
Β·
1 Parent(s): f917448

Fix Gradio ChatInterface theme compatibility

Browse files
Files changed (1) hide show
  1. app/gradio_interface.py +18 -16
app/gradio_interface.py CHANGED
@@ -259,28 +259,30 @@ custom_css = """
259
  """
260
 
261
  # Create Gradio interface with custom theme
262
- demo = gr.ChatInterface(
263
- fn=generate_response,
264
- title="πŸ™ ORA",
265
- description="✨ Your Spiritual AI Companion β€’ Powered by ZeroGPU for Lightning-Fast Responses ✨",
266
- examples=[
267
- "What does the Bible say about finding peace in difficult times?",
268
- "How can I grow closer to God?",
269
- "Explain the parable of the prodigal son",
270
- "What is the meaning of faith?",
271
- ],
272
  theme=gr.themes.Soft(
273
  primary_hue="purple",
274
  secondary_hue="blue",
275
  neutral_hue="slate",
276
  font=["Inter", "Crimson Text", "sans-serif"]
277
  ),
278
- css=custom_css,
279
- retry_btn=None,
280
- undo_btn=None,
281
- clear_btn="✨ New Conversation",
282
- submit_btn="πŸ™ Ask ORA",
283
- )
 
 
 
 
 
 
 
 
 
 
 
284
 
285
  if __name__ == "__main__":
286
  demo.launch(server_name="0.0.0.0", server_port=7860, share=False)
 
259
  """
260
 
261
  # Create Gradio interface with custom theme
262
+ with gr.Blocks(
 
 
 
 
 
 
 
 
 
263
  theme=gr.themes.Soft(
264
  primary_hue="purple",
265
  secondary_hue="blue",
266
  neutral_hue="slate",
267
  font=["Inter", "Crimson Text", "sans-serif"]
268
  ),
269
+ css=custom_css
270
+ ) as demo:
271
+ gr.ChatInterface(
272
+ fn=generate_response,
273
+ title="πŸ™ ORA",
274
+ description="✨ Your Spiritual AI Companion β€’ Powered by ZeroGPU for Lightning-Fast Responses ✨",
275
+ examples=[
276
+ "What does the Bible say about finding peace in difficult times?",
277
+ "How can I grow closer to God?",
278
+ "Explain the parable of the prodigal son",
279
+ "What is the meaning of faith?",
280
+ ],
281
+ retry_btn=None,
282
+ undo_btn=None,
283
+ clear_btn="✨ New Conversation",
284
+ submit_btn="πŸ™ Ask ORA",
285
+ )
286
 
287
  if __name__ == "__main__":
288
  demo.launch(server_name="0.0.0.0", server_port=7860, share=False)