Spaces:
Running
Running
mrbeliever
commited on
Commit
•
2e7a398
1
Parent(s):
9f11ab8
Update app.py
Browse files
app.py
CHANGED
@@ -40,18 +40,32 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
|
|
40 |
yield output.strip('</s>')
|
41 |
return output.strip('</s>')
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
yield output.strip('</s>')
|
41 |
return output.strip('</s>')
|
42 |
|
43 |
+
def dark_theme():
|
44 |
+
return """
|
45 |
+
body {
|
46 |
+
background-color: #121212;
|
47 |
+
color: #ffffff;
|
48 |
+
}
|
49 |
+
.gradio-container {
|
50 |
+
background-color: #121212;
|
51 |
+
color: #ffffff;
|
52 |
+
}
|
53 |
+
input, textarea, select {
|
54 |
+
background-color: #333333 !important;
|
55 |
+
color: #ffffff !important;
|
56 |
+
border-color: #555555 !important;
|
57 |
+
}
|
58 |
+
.gradio-container button {
|
59 |
+
background-color: #555555 !important;
|
60 |
+
color: #ffffff !important;
|
61 |
+
}
|
62 |
+
"""
|
63 |
+
|
64 |
+
with gr.Interface(
|
65 |
+
fn=generate,
|
66 |
+
inputs=gr.Textbox(placeholder="Enter your prompt here...", label="Prompt"),
|
67 |
+
outputs=gr.Textbox(label="Output", interactive=True, lines=10),
|
68 |
+
theme="compact", # Use compact theme for default layout
|
69 |
+
css=dark_theme() # Apply dark theme styles
|
70 |
+
) as app:
|
71 |
+
app.launch()
|