Spaces:
Sleeping
Sleeping
Commit
Β·
347ee82
1
Parent(s):
f917448
Fix Gradio ChatInterface theme compatibility
Browse files- 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 |
-
|
| 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 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 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)
|