Upload app.py
Browse files
app.py
CHANGED
@@ -20,18 +20,48 @@ def chatbot_response(message):
|
|
20 |
response = query_engine.query(message)
|
21 |
return str(response)
|
22 |
|
23 |
-
# Custom CSS for purple Submit button
|
24 |
custom_css = """
|
25 |
-
button
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
background: linear-gradient(45deg, #8B5CF6, #A855F7) !important;
|
27 |
border: none !important;
|
28 |
color: white !important;
|
|
|
29 |
}
|
30 |
|
31 |
-
button.primary:hover
|
|
|
|
|
|
|
|
|
|
|
32 |
background: linear-gradient(45deg, #7C3AED, #9333EA) !important;
|
33 |
-
transform: translateY(-2px);
|
34 |
-
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
"""
|
37 |
|
|
|
20 |
response = query_engine.query(message)
|
21 |
return str(response)
|
22 |
|
23 |
+
# Custom CSS for purple Submit button - Multiple selectors for HF Spaces compatibility
|
24 |
custom_css = """
|
25 |
+
/* Primary button selectors for different Gradio versions */
|
26 |
+
button.primary,
|
27 |
+
.primary,
|
28 |
+
button[variant="primary"],
|
29 |
+
.gradio-button.primary,
|
30 |
+
button.lg.primary,
|
31 |
+
button.svelte-cmf5ev.primary {
|
32 |
background: linear-gradient(45deg, #8B5CF6, #A855F7) !important;
|
33 |
border: none !important;
|
34 |
color: white !important;
|
35 |
+
border-radius: 8px !important;
|
36 |
}
|
37 |
|
38 |
+
button.primary:hover,
|
39 |
+
.primary:hover,
|
40 |
+
button[variant="primary"]:hover,
|
41 |
+
.gradio-button.primary:hover,
|
42 |
+
button.lg.primary:hover,
|
43 |
+
button.svelte-cmf5ev.primary:hover {
|
44 |
background: linear-gradient(45deg, #7C3AED, #9333EA) !important;
|
45 |
+
transform: translateY(-2px) !important;
|
46 |
+
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
|
47 |
+
transition: all 0.2s ease !important;
|
48 |
+
}
|
49 |
+
|
50 |
+
/* More specific selectors for HF Spaces */
|
51 |
+
.gradio-container button[type="submit"],
|
52 |
+
.gradio-container .primary-button,
|
53 |
+
.gradio-container .submit-button {
|
54 |
+
background: linear-gradient(45deg, #8B5CF6, #A855F7) !important;
|
55 |
+
border: none !important;
|
56 |
+
color: white !important;
|
57 |
+
}
|
58 |
+
|
59 |
+
/* Force override any existing styles */
|
60 |
+
[data-testid="primary-button"],
|
61 |
+
[role="button"].primary {
|
62 |
+
background: linear-gradient(45deg, #8B5CF6, #A855F7) !important;
|
63 |
+
border: none !important;
|
64 |
+
color: white !important;
|
65 |
}
|
66 |
"""
|
67 |
|