Update app.py
Browse files
app.py
CHANGED
@@ -384,9 +384,8 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
|
|
384 |
#LLM auswählen (OpenAI oder HF)
|
385 |
###########################
|
386 |
if (model_option == "OpenAI"):
|
387 |
-
|
388 |
#Anfrage an OpenAI ----------------------------
|
389 |
-
if (prompt.find('Bild zeichnen')):
|
390 |
print("OpenAI zeichnen.......................")
|
391 |
llm = ChatOpenAI(model_name = MODEL_NAME_OAI_ZEICHNEN, openai_api_key = openai_api_key, temperature=temperature)#, top_p = top_p)
|
392 |
else:
|
@@ -424,7 +423,7 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
|
|
424 |
raise gr.Error(e)
|
425 |
|
426 |
|
427 |
-
if (prompt.find('Bild zeichnen')):
|
428 |
history[-1][1] = result
|
429 |
return history, "Stop: Success"
|
430 |
else:
|
|
|
384 |
#LLM auswählen (OpenAI oder HF)
|
385 |
###########################
|
386 |
if (model_option == "OpenAI"):
|
|
|
387 |
#Anfrage an OpenAI ----------------------------
|
388 |
+
if (prompt.find('Bild zeichnen') != -1):
|
389 |
print("OpenAI zeichnen.......................")
|
390 |
llm = ChatOpenAI(model_name = MODEL_NAME_OAI_ZEICHNEN, openai_api_key = openai_api_key, temperature=temperature)#, top_p = top_p)
|
391 |
else:
|
|
|
423 |
raise gr.Error(e)
|
424 |
|
425 |
|
426 |
+
if (prompt.find('Bild zeichnen') != -1):
|
427 |
history[-1][1] = result
|
428 |
return history, "Stop: Success"
|
429 |
else:
|