Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,23 +36,33 @@ def chat_with_groq(user_input, history):
|
|
| 36 |
print(f"Error during API call: {e}")
|
| 37 |
return history, "Error occurred during the chat. Please check the API key."
|
| 38 |
|
| 39 |
-
# Custom CSS for
|
| 40 |
custom_css = """
|
| 41 |
body {
|
| 42 |
-
background: url('https://
|
| 43 |
background-size: cover;
|
| 44 |
color: white;
|
|
|
|
| 45 |
}
|
|
|
|
| 46 |
#chatbot-container {
|
| 47 |
-
background: rgba(0, 0, 0, 0.
|
| 48 |
-
border-radius:
|
| 49 |
padding: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
"""
|
| 52 |
|
| 53 |
-
# Create Gradio UI with space
|
| 54 |
with gr.Blocks(css=custom_css) as demo:
|
| 55 |
-
gr.Markdown("<h1
|
| 56 |
|
| 57 |
with gr.Row():
|
| 58 |
with gr.Column():
|
|
|
|
| 36 |
print(f"Error during API call: {e}")
|
| 37 |
return history, "Error occurred during the chat. Please check the API key."
|
| 38 |
|
| 39 |
+
# Custom CSS for a stars & galaxies background
|
| 40 |
custom_css = """
|
| 41 |
body {
|
| 42 |
+
background: url('https://wallpaperaccess.com/full/2055391.jpg') no-repeat center center fixed;
|
| 43 |
background-size: cover;
|
| 44 |
color: white;
|
| 45 |
+
font-family: 'Arial', sans-serif;
|
| 46 |
}
|
| 47 |
+
|
| 48 |
#chatbot-container {
|
| 49 |
+
background: rgba(0, 0, 0, 0.85);
|
| 50 |
+
border-radius: 12px;
|
| 51 |
padding: 20px;
|
| 52 |
+
box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
h1 {
|
| 56 |
+
text-align: center;
|
| 57 |
+
color: #FFD700;
|
| 58 |
+
font-size: 36px;
|
| 59 |
+
text-shadow: 0px 0px 10px rgba(255, 255, 255, 0.8);
|
| 60 |
}
|
| 61 |
"""
|
| 62 |
|
| 63 |
+
# Create Gradio UI with a stunning space background
|
| 64 |
with gr.Blocks(css=custom_css) as demo:
|
| 65 |
+
gr.Markdown("<h1>ππ Space AI ChatBot πͺ</h1>")
|
| 66 |
|
| 67 |
with gr.Row():
|
| 68 |
with gr.Column():
|