Update app.py
Browse files
app.py
CHANGED
|
@@ -17,66 +17,6 @@ def get_response(user_input):
|
|
| 17 |
return "π Sorry, there was an error with your request."
|
| 18 |
|
| 19 |
|
| 20 |
-
# Custom CSS to make the interface more spiritual and aesthetic
|
| 21 |
-
custom_css = """
|
| 22 |
-
body {
|
| 23 |
-
background: linear-gradient(135deg, #ffefba, #ffffff);
|
| 24 |
-
font-family: 'Georgia', serif;
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
.gradio-container {
|
| 28 |
-
border: 2px solid #f1c40f;
|
| 29 |
-
border-radius: 15px;
|
| 30 |
-
padding: 20px;
|
| 31 |
-
background-color: rgba(255, 255, 255, 0.9);
|
| 32 |
-
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
h1 {
|
| 36 |
-
font-family: 'Georgia', serif;
|
| 37 |
-
color: #d35400;
|
| 38 |
-
text-align: center;
|
| 39 |
-
font-size: 2.5em;
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
.gradio-input, .gradio-output {
|
| 43 |
-
font-family: 'Georgia', serif;
|
| 44 |
-
font-size: 1.1em;
|
| 45 |
-
color: #2c3e50;
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
input, textarea {
|
| 49 |
-
border-radius: 10px;
|
| 50 |
-
padding: 10px;
|
| 51 |
-
font-size: 1.1em;
|
| 52 |
-
border: 2px solid #e67e22;
|
| 53 |
-
width: 100%;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
textarea {
|
| 57 |
-
height: 200px;
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
-
button {
|
| 61 |
-
background-color: #e67e22;
|
| 62 |
-
border-radius: 10px;
|
| 63 |
-
font-size: 1.2em;
|
| 64 |
-
padding: 10px;
|
| 65 |
-
color: white;
|
| 66 |
-
width: 100%;
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
button:hover {
|
| 70 |
-
background-color: #d35400;
|
| 71 |
-
}
|
| 72 |
-
|
| 73 |
-
footer {
|
| 74 |
-
color: #7f8c8d;
|
| 75 |
-
text-align: center;
|
| 76 |
-
margin-top: 20px;
|
| 77 |
-
}
|
| 78 |
-
"""
|
| 79 |
-
|
| 80 |
# Create the Gradio interface
|
| 81 |
iface = gr.Interface(
|
| 82 |
fn=get_response, # Function to call when user submits input
|
|
@@ -85,8 +25,7 @@ iface = gr.Interface(
|
|
| 85 |
title="ποΈ Temple Dekho Chat Bot ποΈ",
|
| 86 |
description="π’ You can now use, Backend Server is live!\n\nπ Ask a question about temples or rituals and get wise answers from Guruji!",
|
| 87 |
theme="default", # Use the default theme
|
| 88 |
-
css=custom_css # Apply the custom CSS for styling
|
| 89 |
)
|
| 90 |
|
| 91 |
# Launch the Gradio app with a specific server port
|
| 92 |
-
iface.launch(server_name="0.0.0.0", server_port=8709)
|
|
|
|
| 17 |
return "π Sorry, there was an error with your request."
|
| 18 |
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
# Create the Gradio interface
|
| 21 |
iface = gr.Interface(
|
| 22 |
fn=get_response, # Function to call when user submits input
|
|
|
|
| 25 |
title="ποΈ Temple Dekho Chat Bot ποΈ",
|
| 26 |
description="π’ You can now use, Backend Server is live!\n\nπ Ask a question about temples or rituals and get wise answers from Guruji!",
|
| 27 |
theme="default", # Use the default theme
|
|
|
|
| 28 |
)
|
| 29 |
|
| 30 |
# Launch the Gradio app with a specific server port
|
| 31 |
+
iface.launch(server_name="0.0.0.0", server_port=8709, share=True)
|