Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ with gr.Blocks() as demo:
|
|
59 |
def _retrieve(message, chat_history):
|
60 |
idx = int(message)
|
61 |
for _, m in chat_history[::-1]:
|
62 |
-
if m.startswith("results
|
63 |
for n in m.split("\n")[1:]:
|
64 |
print(n)
|
65 |
if str(idx) == n.split(".")[0]:
|
@@ -69,7 +69,8 @@ with gr.Blocks() as demo:
|
|
69 |
chat_history.append((message, f"contents of {n}:\n{article}"))
|
70 |
return "", chat_history
|
71 |
print("nothing found")
|
72 |
-
|
|
|
73 |
|
74 |
def respond(message, chat_history):
|
75 |
print(f"received input '{message}'")
|
|
|
59 |
def _retrieve(message, chat_history):
|
60 |
idx = int(message)
|
61 |
for _, m in chat_history[::-1]:
|
62 |
+
if m.startswith("results"):
|
63 |
for n in m.split("\n")[1:]:
|
64 |
print(n)
|
65 |
if str(idx) == n.split(".")[0]:
|
|
|
69 |
chat_history.append((message, f"contents of {n}:\n{article}"))
|
70 |
return "", chat_history
|
71 |
print("nothing found")
|
72 |
+
chat_history.append((message, "🤔 article not found"))
|
73 |
+
return "", chat_history
|
74 |
|
75 |
def respond(message, chat_history):
|
76 |
print(f"received input '{message}'")
|