Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,10 +53,35 @@ def chat_with_model(user_input, hf_api_key):
|
|
53 |
except Exception as e:
|
54 |
return f"Error: {e}"
|
55 |
|
56 |
-
# Create the Gradio interface
|
57 |
-
with gr.Blocks(
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
# Create the input and output interface
|
62 |
with gr.Row():
|
|
|
53 |
except Exception as e:
|
54 |
return f"Error: {e}"
|
55 |
|
56 |
+
# Create the Gradio interface with a dark theme
|
57 |
+
with gr.Blocks(
|
58 |
+
css="""
|
59 |
+
body {
|
60 |
+
background-color: #121212;
|
61 |
+
color: #ffffff;
|
62 |
+
}
|
63 |
+
.gradio-container {
|
64 |
+
background-color: #1e1e1e;
|
65 |
+
}
|
66 |
+
.gradio-container input, .gradio-container textarea, .gradio-container button {
|
67 |
+
color: #ffffff;
|
68 |
+
background-color: #2e2e2e;
|
69 |
+
border: 1px solid #555555;
|
70 |
+
}
|
71 |
+
.gradio-container textarea::placeholder, .gradio-container input::placeholder {
|
72 |
+
color: #bbbbbb;
|
73 |
+
}
|
74 |
+
.gradio-container button {
|
75 |
+
background-color: #333333;
|
76 |
+
border: 1px solid #777777;
|
77 |
+
}
|
78 |
+
.gradio-container button:hover {
|
79 |
+
background-color: #444444;
|
80 |
+
}
|
81 |
+
"""
|
82 |
+
) as demo:
|
83 |
+
gr.Markdown("# Code Assistant with Qwen2.5-Coder", elem_id="title")
|
84 |
+
gr.Markdown("Ask me anything about coding! Enter your Hugging Face API key to start.", elem_id="description")
|
85 |
|
86 |
# Create the input and output interface
|
87 |
with gr.Row():
|