re-added chatinterface
Browse files
app.py
CHANGED
@@ -65,4 +65,21 @@ def krypton(input, history):
|
|
65 |
buffer += new_text
|
66 |
generated_text_without_prompt = buffer
|
67 |
time.sleep(0.06)
|
68 |
-
yield generated_text_without_prompt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
buffer += new_text
|
66 |
generated_text_without_prompt = buffer
|
67 |
time.sleep(0.06)
|
68 |
+
yield generated_text_without_prompt
|
69 |
+
|
70 |
+
|
71 |
+
chatbot = gr.Chatbot(height=600, label="Krypt AI")
|
72 |
+
chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeholder="Enter your question or upload an image.", show_label=False)
|
73 |
+
|
74 |
+
with gr.Blocks(fill_height=True) as demo:
|
75 |
+
gr.Markdown(DESCRIPTION)
|
76 |
+
gr.ChatInterface(
|
77 |
+
fn=krypton,
|
78 |
+
chatbot=chatbot,
|
79 |
+
fill_height=True,
|
80 |
+
multimodal=True,
|
81 |
+
textbox=chat_input,
|
82 |
+
)
|
83 |
+
|
84 |
+
demo.queue(api_open=False)
|
85 |
+
demo.launch(show_api=False, share=False)
|