Update app.py
Browse files
app.py
CHANGED
@@ -393,7 +393,8 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
|
|
393 |
if (prompt.find('Bild zeichnen') != -1):
|
394 |
#print("OpenAI zeichnen.......................")
|
395 |
#llm = ChatOpenAI(model_name = MODEL_NAME_OAI_ZEICHNEN, openai_api_key = openai_api_key, temperature=temperature)#, top_p = top_p)
|
396 |
-
data = {"inputs": prompt}
|
|
|
397 |
response = requests.post(API_URL, headers=HEADERS, json=data)
|
398 |
result = response.json()["images"][0]
|
399 |
image_b64 = (f"data:image/jpeg;base64,{result}")
|
|
|
393 |
if (prompt.find('Bild zeichnen') != -1):
|
394 |
#print("OpenAI zeichnen.......................")
|
395 |
#llm = ChatOpenAI(model_name = MODEL_NAME_OAI_ZEICHNEN, openai_api_key = openai_api_key, temperature=temperature)#, top_p = top_p)
|
396 |
+
#data = {"inputs": prompt}
|
397 |
+
data = {'prompt': prompt, 'guidance_scale': scale}
|
398 |
response = requests.post(API_URL, headers=HEADERS, json=data)
|
399 |
result = response.json()["images"][0]
|
400 |
image_b64 = (f"data:image/jpeg;base64,{result}")
|