Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,34 @@ def generate_response(history, user_input, temperature, max_new_tokens):
|
|
25 |
def clear_chat():
|
26 |
return [], ""
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
# Create the Gradio interface
|
29 |
-
with gr.Blocks() as demo:
|
30 |
gr.Markdown("## Cotype-Nano Text Generation Chat")
|
31 |
|
32 |
chatbot = gr.Chatbot([], elem_id="chatbot", type='messages')
|
|
|
25 |
def clear_chat():
|
26 |
return [], ""
|
27 |
|
28 |
+
# Custom CSS for styling
|
29 |
+
custom_css = """
|
30 |
+
#chatbot {
|
31 |
+
height: 400px;
|
32 |
+
overflow-y: auto;
|
33 |
+
border: 1px solid #ccc;
|
34 |
+
padding: 10px;
|
35 |
+
border-radius: 5px;
|
36 |
+
}
|
37 |
+
.gr-button {
|
38 |
+
margin-top: 10px;
|
39 |
+
padding: 10px 20px;
|
40 |
+
font-size: 16px;
|
41 |
+
border-radius: 5px;
|
42 |
+
}
|
43 |
+
.gr-textbox {
|
44 |
+
margin-top: 10px;
|
45 |
+
padding: 10px;
|
46 |
+
font-size: 16px;
|
47 |
+
border-radius: 5px;
|
48 |
+
}
|
49 |
+
.gr-slider {
|
50 |
+
margin-top: 20px;
|
51 |
+
}
|
52 |
+
"""
|
53 |
+
|
54 |
# Create the Gradio interface
|
55 |
+
with gr.Blocks(css=custom_css) as demo:
|
56 |
gr.Markdown("## Cotype-Nano Text Generation Chat")
|
57 |
|
58 |
chatbot = gr.Chatbot([], elem_id="chatbot", type='messages')
|