Update app.py
Browse files
app.py
CHANGED
@@ -521,10 +521,10 @@ def generate_text_zu_bild(file, prompt, k, rag_option, chatbot):
|
|
521 |
|
522 |
headers, payload = process_image(file, prompt_neu)
|
523 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
524 |
-
print("response....................")
|
525 |
-
print(response)
|
526 |
#als json ausgeben
|
527 |
data = response.json()
|
|
|
|
|
528 |
# Den "content" auswählen, da dort die Antwort der Ki enthalten ist
|
529 |
result = data['choices'][0]['message']['content']
|
530 |
return result
|
|
|
521 |
|
522 |
headers, payload = process_image(file, prompt_neu)
|
523 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
|
|
|
|
524 |
#als json ausgeben
|
525 |
data = response.json()
|
526 |
+
print("response....................")
|
527 |
+
print(data)
|
528 |
# Den "content" auswählen, da dort die Antwort der Ki enthalten ist
|
529 |
result = data['choices'][0]['message']['content']
|
530 |
return result
|