Update app.py
Browse files
app.py
CHANGED
|
@@ -140,7 +140,8 @@ def add_text(chatbot, history, prompt, file):
|
|
| 140 |
chatbot = chatbot + [((file.name,), "Prompt fehlt!")]
|
| 141 |
else:
|
| 142 |
chatbot = chatbot + [((file.name,), None), (prompt, None)]
|
| 143 |
-
|
|
|
|
| 144 |
return chatbot, history, prompt, "", gr.File( label=None, interactive=False, height=20, min_width=20, visible=False, scale=2) #gr.Textbox(value="", interactive=False)
|
| 145 |
|
| 146 |
def add_file(history, file, prompt):
|
|
@@ -337,7 +338,6 @@ def generate_prompt_with_history_openai(prompt, history):
|
|
| 337 |
history_openai_format.append({"role": "user", "content": prompt})
|
| 338 |
print("openai history und prompt................")
|
| 339 |
print(history_openai_format)
|
| 340 |
-
print (history_openai_format)
|
| 341 |
return history_openai_format
|
| 342 |
|
| 343 |
#Prompt und History für Hugging Face Schnittstelle
|
|
|
|
| 140 |
chatbot = chatbot + [((file.name,), "Prompt fehlt!")]
|
| 141 |
else:
|
| 142 |
chatbot = chatbot + [((file.name,), None), (prompt, None)]
|
| 143 |
+
print("chatbot nach add_text............")
|
| 144 |
+
print(chatbot)
|
| 145 |
return chatbot, history, prompt, "", gr.File( label=None, interactive=False, height=20, min_width=20, visible=False, scale=2) #gr.Textbox(value="", interactive=False)
|
| 146 |
|
| 147 |
def add_file(history, file, prompt):
|
|
|
|
| 338 |
history_openai_format.append({"role": "user", "content": prompt})
|
| 339 |
print("openai history und prompt................")
|
| 340 |
print(history_openai_format)
|
|
|
|
| 341 |
return history_openai_format
|
| 342 |
|
| 343 |
#Prompt und History für Hugging Face Schnittstelle
|