Update app.py
Browse files
app.py
CHANGED
|
@@ -36,12 +36,13 @@ def chat_fn(user_input, history):
|
|
| 36 |
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
gr.Markdown("# 🦙 CodeLlama Copilot\nFree & private code assistant.")
|
| 39 |
-
chatbot = gr.Chatbot(label="Developer Assistant"
|
| 40 |
with gr.Row():
|
| 41 |
-
msg = gr.Textbox(placeholder="Ask me coding questions", show_label=False
|
| 42 |
clear = gr.Button("🔄 Clear Conversation")
|
| 43 |
msg.submit(chat_fn, [msg, chatbot], [msg, chatbot])
|
| 44 |
clear.click(lambda: ("", []), None, [msg, chatbot])
|
| 45 |
|
| 46 |
if __name__ == "__main__":
|
| 47 |
-
demo.launch()
|
|
|
|
|
|
| 36 |
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
gr.Markdown("# 🦙 CodeLlama Copilot\nFree & private code assistant.")
|
| 39 |
+
chatbot = gr.Chatbot(label="Developer Assistant", height=400, type="messages")
|
| 40 |
with gr.Row():
|
| 41 |
+
msg = gr.Textbox(placeholder="Ask me coding questions", show_label=False, container=False)
|
| 42 |
clear = gr.Button("🔄 Clear Conversation")
|
| 43 |
msg.submit(chat_fn, [msg, chatbot], [msg, chatbot])
|
| 44 |
clear.click(lambda: ("", []), None, [msg, chatbot])
|
| 45 |
|
| 46 |
if __name__ == "__main__":
|
| 47 |
+
demo.launch()
|
| 48 |
+
EOL
|