Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,15 +19,6 @@ openrouter_key = os.environ.get("OPENROUTER_KEY")
|
|
19 |
model = EmbeddingModel(use_quantized_onnx_model=True)
|
20 |
|
21 |
|
22 |
-
# Define a custom theme
|
23 |
-
custom_theme = gr.themes.Default(
|
24 |
-
primary_hue="#3498db", # Custom primary color
|
25 |
-
secondary_hue="#2ecc71", # Custom secondary color
|
26 |
-
font="Roboto", # Custom font
|
27 |
-
font_size="16px", # Custom font size
|
28 |
-
rounded_corners=True, # Enable rounded corners
|
29 |
-
background_color="#f0f0f0", # Custom background color
|
30 |
-
)
|
31 |
|
32 |
# Configure logging
|
33 |
logging.basicConfig(level=logging.ERROR, format='%(asctime)s - %(levelname)s - %(message)s')
|
@@ -187,22 +178,21 @@ async def predict(message, history):
|
|
187 |
pass
|
188 |
|
189 |
|
190 |
-
# Define a custom theme
|
191 |
custom_theme = gr.themes.Default(
|
192 |
-
primary_hue="#
|
193 |
-
secondary_hue="#
|
194 |
font="Roboto", # Custom font
|
195 |
font_size="16px", # Custom font size
|
196 |
rounded_corners=True, # Enable rounded corners
|
197 |
-
background_color="#
|
|
|
198 |
)
|
199 |
|
200 |
def predict(message, history):
|
201 |
# Your predict function implementation
|
202 |
-
pass
|
203 |
-
|
204 |
|
205 |
-
# Apply the custom theme to the Gradio interface
|
206 |
gr.ChatInterface(
|
207 |
predict,
|
208 |
title="Live Web Chat",
|
@@ -216,4 +206,3 @@ gr.ChatInterface(
|
|
216 |
],
|
217 |
theme=custom_theme # Apply the custom theme
|
218 |
).launch()
|
219 |
-
).launch()
|
|
|
19 |
model = EmbeddingModel(use_quantized_onnx_model=True)
|
20 |
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
# Configure logging
|
24 |
logging.basicConfig(level=logging.ERROR, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
178 |
pass
|
179 |
|
180 |
|
181 |
+
# Define a custom theme with colors similar to the provided image
|
182 |
custom_theme = gr.themes.Default(
|
183 |
+
primary_hue="#6a0dad", # Custom primary color (similar to the purple in the image)
|
184 |
+
secondary_hue="#4b0082", # Custom secondary color
|
185 |
font="Roboto", # Custom font
|
186 |
font_size="16px", # Custom font size
|
187 |
rounded_corners=True, # Enable rounded corners
|
188 |
+
background_color="#1a1a2e", # Custom dark background color
|
189 |
+
text_color="#f0f0f0" # Custom text color for better contrast
|
190 |
)
|
191 |
|
192 |
def predict(message, history):
|
193 |
# Your predict function implementation
|
194 |
+
pass# Apply the custom theme to the Gradio interface
|
|
|
195 |
|
|
|
196 |
gr.ChatInterface(
|
197 |
predict,
|
198 |
title="Live Web Chat",
|
|
|
206 |
],
|
207 |
theme=custom_theme # Apply the custom theme
|
208 |
).launch()
|
|