Update app.py
Browse files
app.py
CHANGED
@@ -464,10 +464,8 @@ def generate_text (prompt, chatbot, history, rag_option, model_option, openai_ap
|
|
464 |
result = resulti.strip()
|
465 |
else:
|
466 |
data = {"inputs": prompt}
|
467 |
-
response = requests.post(
|
468 |
-
|
469 |
-
print(response.getattr())
|
470 |
-
result = response.content #json()
|
471 |
print("result. HF API.....................")
|
472 |
print(result)
|
473 |
|
|
|
464 |
result = resulti.strip()
|
465 |
else:
|
466 |
data = {"inputs": prompt}
|
467 |
+
response = requests.post(API_URL_TEXT, headers=HEADERS, json=data)
|
468 |
+
result = response.json()
|
|
|
|
|
469 |
print("result. HF API.....................")
|
470 |
print(result)
|
471 |
|