Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def bot(user_message, history):
|
|
66 |
prompt = generate_prompt_with_history(user_message,history)
|
67 |
print(prompt)
|
68 |
stream = client.text_generation(prompt, stream=True, details=True, **gen_kwargs)
|
69 |
-
print("stream")
|
70 |
'''
|
71 |
history[-1][1] = ""
|
72 |
for character in stream:
|
@@ -100,9 +100,8 @@ with open("custom.css", "r", encoding="utf-8") as f:
|
|
100 |
|
101 |
with gr.Blocks() as demo:
|
102 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
|
103 |
-
|
104 |
with gr.Row():
|
105 |
-
status_display = gr.Markdown("Erfolg", elem_id="status_display")
|
106 |
with gr.Column(scale=0.85):
|
107 |
txt = gr.Textbox(
|
108 |
show_label=False,
|
@@ -110,17 +109,17 @@ with gr.Blocks() as demo:
|
|
110 |
).style(container=False)
|
111 |
with gr.Column(scale=0.15, min_width=0):
|
112 |
btn = gr.UploadButton("๐", file_types=["image", "video", "audio"])
|
113 |
-
with gr.Column(min_width=100, scale=1):
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
|
118 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
119 |
bot, [txt, chatbot], chatbot
|
120 |
)
|
121 |
txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
|
122 |
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
123 |
-
bot, chatbot, chatbot
|
124 |
)
|
125 |
|
126 |
#Berechnung oder Ausgabe anhalten (kann danach fortgesetzt werden)
|
|
|
66 |
prompt = generate_prompt_with_history(user_message,history)
|
67 |
print(prompt)
|
68 |
stream = client.text_generation(prompt, stream=True, details=True, **gen_kwargs)
|
69 |
+
print("++++++++++++++++++++++++++++stream++++++++++++++++++")
|
70 |
'''
|
71 |
history[-1][1] = ""
|
72 |
for character in stream:
|
|
|
100 |
|
101 |
with gr.Blocks() as demo:
|
102 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
|
103 |
+
status_display = gr.Markdown("Erfolg", elem_id="status_display")
|
104 |
with gr.Row():
|
|
|
105 |
with gr.Column(scale=0.85):
|
106 |
txt = gr.Textbox(
|
107 |
show_label=False,
|
|
|
109 |
).style(container=False)
|
110 |
with gr.Column(scale=0.15, min_width=0):
|
111 |
btn = gr.UploadButton("๐", file_types=["image", "video", "audio"])
|
112 |
+
with gr.Column(min_width=100, scale=1):
|
113 |
+
cancelBtn = gr.Button("Stoppen")
|
114 |
+
with gr.Row(scale=1):
|
115 |
+
emptyBtn = gr.Button("๐งน Neuer Chat",)
|
116 |
|
117 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
118 |
bot, [txt, chatbot], chatbot
|
119 |
)
|
120 |
txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
|
121 |
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
122 |
+
bot, [txt, chatbot], chatbot
|
123 |
)
|
124 |
|
125 |
#Berechnung oder Ausgabe anhalten (kann danach fortgesetzt werden)
|