Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,19 @@ def analyze_text(text):
|
|
33 |
|
34 |
# --- Interface ---
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
css = """
|
37 |
.gradio-container {
|
38 |
background-color: #000000; /* Black background for the container */
|
@@ -98,8 +111,7 @@ h2 {
|
|
98 |
iface = gr.Interface(
|
99 |
fn=get_response,
|
100 |
inputs=[
|
101 |
-
|
102 |
-
style={'background-color': '#111111', 'color': '#00FF00', 'border': '1px solid #00FF00'}),
|
103 |
gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, step=0.1, value=0.7),
|
104 |
gr.Slider(label="Top p", minimum=0.1, maximum=1.0, step=0.1, value=0.9),
|
105 |
gr.Slider(label="Top k", minimum=1, maximum=100, step=1, value=50),
|
|
|
33 |
|
34 |
# --- Interface ---
|
35 |
|
36 |
+
def custom_textbox(label, lines, placeholder, show_label=True):
|
37 |
+
textbox = gr.Textbox(label=label, lines=lines, placeholder=placeholder, show_label=show_label)
|
38 |
+
html = gr.HTML(f"""
|
39 |
+
<style>
|
40 |
+
.gradio-textbox {
|
41 |
+
background-color: #111111;
|
42 |
+
color: #00FF00;
|
43 |
+
border: 1px solid #00FF00;
|
44 |
+
}
|
45 |
+
</style>
|
46 |
+
""")
|
47 |
+
return textbox, html
|
48 |
+
|
49 |
css = """
|
50 |
.gradio-container {
|
51 |
background-color: #000000; /* Black background for the container */
|
|
|
111 |
iface = gr.Interface(
|
112 |
fn=get_response,
|
113 |
inputs=[
|
114 |
+
*custom_textbox(label="Your message:", lines=5, placeholder="Ask me anything...", show_label=True),
|
|
|
115 |
gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, step=0.1, value=0.7),
|
116 |
gr.Slider(label="Top p", minimum=0.1, maximum=1.0, step=0.1, value=0.9),
|
117 |
gr.Slider(label="Top k", minimum=1, maximum=100, step=1, value=50),
|