Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,21 +4,43 @@ from huggingface_hub import InferenceClient
|
|
| 4 |
from sentence_transformers import SentenceTransformer
|
| 5 |
import torch
|
| 6 |
|
| 7 |
-
theme = gr.themes.
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
)
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
# SEMANTIC SEARCH STEP 2
|
|
|
|
| 4 |
from sentence_transformers import SentenceTransformer
|
| 5 |
import torch
|
| 6 |
|
| 7 |
+
theme = gr.themes.Base() # use a simple base theme, we'll add custom CSS
|
| 8 |
+
|
| 9 |
+
# --- Custom CSS ---
|
| 10 |
+
custom_css = """
|
| 11 |
+
body {
|
| 12 |
+
background-color: #e0f7f7 !important; /* soft teal background */
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.gradio-container {
|
| 16 |
+
font-family: "Helvetica", sans-serif;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.gr-button-primary {
|
| 20 |
+
background: linear-gradient(145deg, #00796b, #004d40) !important; /* deep teal gradient */
|
| 21 |
+
color: white !important;
|
| 22 |
+
box-shadow: 0px 4px 12px rgba(0,0,0,0.2) !important;
|
| 23 |
+
border-radius: 12px !important;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.gr-button-secondary {
|
| 27 |
+
background: linear-gradient(145deg, #0288d1, #01579b) !important; /* vibrant blue gradient */
|
| 28 |
+
color: white !important;
|
| 29 |
+
box-shadow: 0px 4px 12px rgba(0,0,0,0.2) !important;
|
| 30 |
+
border-radius: 12px !important;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.gr-chat-message {
|
| 34 |
+
background: #ffffff !important;
|
| 35 |
+
box-shadow: 0px 4px 15px rgba(0,0,0,0.15) !important;
|
| 36 |
+
border-radius: 15px !important;
|
| 37 |
+
padding: 10px !important;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
img {
|
| 41 |
+
border-radius: 15px;
|
| 42 |
+
box-shadow: 0px 8px 20px rgba(0,0,0,0.25);
|
| 43 |
+
}
|
| 44 |
|
| 45 |
|
| 46 |
# SEMANTIC SEARCH STEP 2
|