Update app.py
Browse files
app.py
CHANGED
|
@@ -507,6 +507,8 @@ def generate_text_zu_bild(file, prompt, k, rag_option):
|
|
| 507 |
global splittet
|
| 508 |
|
| 509 |
prompt_neu = prompt
|
|
|
|
|
|
|
| 510 |
if (rag_option == "An"):
|
| 511 |
#muss nur einmal ausgeführt werden...
|
| 512 |
if not splittet:
|
|
@@ -519,7 +521,7 @@ def generate_text_zu_bild(file, prompt, k, rag_option):
|
|
| 519 |
#prompt = generate_prompt_with_history_openai(neu_text_mit_chunks, history)
|
| 520 |
#als reiner prompt:
|
| 521 |
prompt_neu = generate_prompt_with_history(neu_text_mit_chunks, history)
|
| 522 |
-
print("hier
|
| 523 |
print(prompt_neu)
|
| 524 |
headers, payload = process_image(file, prompt_neu)
|
| 525 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
|
|
|
| 507 |
global splittet
|
| 508 |
|
| 509 |
prompt_neu = prompt
|
| 510 |
+
prompt("rag_option................................")
|
| 511 |
+
print(rag_option)
|
| 512 |
if (rag_option == "An"):
|
| 513 |
#muss nur einmal ausgeführt werden...
|
| 514 |
if not splittet:
|
|
|
|
| 521 |
#prompt = generate_prompt_with_history_openai(neu_text_mit_chunks, history)
|
| 522 |
#als reiner prompt:
|
| 523 |
prompt_neu = generate_prompt_with_history(neu_text_mit_chunks, history)
|
| 524 |
+
print("hier................................")
|
| 525 |
print(prompt_neu)
|
| 526 |
headers, payload = process_image(file, prompt_neu)
|
| 527 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|