Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,17 +42,33 @@ def respond(
|
|
42 |
"""
|
43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
44 |
"""
|
45 |
-
|
46 |
-
|
47 |
-
textbox=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
|
48 |
-
chatbot=gr.Chatbot(height=400),
|
49 |
-
additional_inputs=[
|
50 |
-
gr.Textbox("You are helpful AI", label="System Prompt"),
|
51 |
-
gr.Slider(500,4000, label="Max New Tokens"),
|
52 |
-
gr.Slider(0,1, label="Temperature", value= 0.7)
|
53 |
-
]
|
54 |
-
)
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
if __name__ == "__main__":
|
58 |
demo.launch()
|
|
|
42 |
"""
|
43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
44 |
"""
|
45 |
+
with gr.Blocks() as demo:
|
46 |
+
with gr.Rows() as row:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
+
with gr.Columns():
|
49 |
+
|
50 |
+
gr.ChatInterface(
|
51 |
+
respond,
|
52 |
+
textbox=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
|
53 |
+
chatbot=gr.Chatbot(height=400),
|
54 |
+
additional_inputs=[
|
55 |
+
gr.Textbox("You are helpful AI", label="System Prompt"),
|
56 |
+
gr.Slider(500,4000, label="Max New Tokens"),
|
57 |
+
gr.Slider(0,1, label="Temperature", value= 0.7)
|
58 |
+
]
|
59 |
+
)
|
60 |
+
with gr.Columns():
|
61 |
+
|
62 |
+
gr.ChatInterface(
|
63 |
+
respond,
|
64 |
+
textbox=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
|
65 |
+
chatbot=gr.Chatbot(height=400),
|
66 |
+
additional_inputs=[
|
67 |
+
gr.Textbox("You are helpful AI", label="System Prompt"),
|
68 |
+
gr.Slider(500,4000, label="Max New Tokens"),
|
69 |
+
gr.Slider(0,1, label="Temperature", value= 0.7)
|
70 |
+
]
|
71 |
+
)
|
72 |
|
73 |
if __name__ == "__main__":
|
74 |
demo.launch()
|