Spaces:
Runtime error
Runtime error
fcernafukuzaki
commited on
Commit
·
52d4a2c
1
Parent(s):
da0867a
Update app.py
Browse files
app.py
CHANGED
@@ -64,16 +64,11 @@ class ChatBotInmobiliaria():
|
|
64 |
if len(question) == 0:
|
65 |
print("Debe de ingresar una pregunta.")
|
66 |
try:
|
67 |
-
return self.index.query(question)
|
68 |
except Exception as e:
|
69 |
print(e)
|
70 |
return "Hubo un error."
|
71 |
-
|
72 |
-
def ask(pregunta):
|
73 |
-
gpt_bot = ChatBotInmobiliaria()
|
74 |
-
gpt_bot.load_dataset(PATH_FILE)
|
75 |
-
return gpt_bot.ask(question=pregunta)
|
76 |
-
|
77 |
|
78 |
# Gradio
|
79 |
|
|
|
64 |
if len(question) == 0:
|
65 |
print("Debe de ingresar una pregunta.")
|
66 |
try:
|
67 |
+
return self.index.query(question + "\nResponde en español")
|
68 |
except Exception as e:
|
69 |
print(e)
|
70 |
return "Hubo un error."
|
71 |
+
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
# Gradio
|
74 |
|