LivanArzuaga commited on
Commit
a1f57e1
verified
1 Parent(s): 96f58cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -14,7 +14,11 @@ logging.basicConfig(level=logging.INFO)
14
  load_dotenv()
15
 
16
  # Configuraci贸n de la API de Flowise
17
- API_URL = os.getenv("API_URL", "https://livanarzuaga-test.hf.space/api/v1/prediction/2a2e535d-1807-4701-8468-c0ede26bcdbf")
 
 
 
 
18
  session = requests.Session()
19
 
20
  # Configurar reintentos
@@ -51,7 +55,7 @@ def get_response(user_input, history, api_url=API_URL):
51
 
52
  # Incluir el historial completo en el payload
53
  payload = {"question": user_input, "history": history}
54
- response = query(payload, api_url)
55
  return response.get('text', "Error: No API response.")
56
 
57
  def export_conversation(past, generated, file_path="conversation.json"):
 
14
  load_dotenv()
15
 
16
  # Configuraci贸n de la API de Flowise
17
+ #API_URL = os.getenv("API_URL", "https://livanarzuaga-test.hf.space/api/v1/prediction/2a2e535d-1807-4701-8468-c0ede26bcdbf")
18
+
19
+ API_URL = os.getenv("API_URL","https://marie0501-boulder-weather-flowise.hf.space/api/v1/prediction/dd2d1375-8019-4f52-bc23-1d0845b4a0c1")
20
+ headers = {"Authorization": "Bearer o6Xy3bIuPhDJV_z0PefeuvbHO2X3yo3Rt7NSiW-bY4o"}
21
+
22
  session = requests.Session()
23
 
24
  # Configurar reintentos
 
55
 
56
  # Incluir el historial completo en el payload
57
  payload = {"question": user_input, "history": history}
58
+ response = query(payload, api_url, headers)
59
  return response.get('text', "Error: No API response.")
60
 
61
  def export_conversation(past, generated, file_path="conversation.json"):