Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def respond(
|
|
36 |
messages.append({"role": "assistant", "content": row['assistant']})
|
37 |
|
38 |
#adding more references
|
39 |
-
selected_references = torch.load('selected_references.sav', map_location=torch.device('cpu'))
|
40 |
encoded_questions = torch.load('encoded_questions.sav', map_location=torch.device('cpu'))
|
41 |
|
42 |
task = 'Given a web search query, retrieve relevant passages that answer the query'
|
@@ -65,7 +65,8 @@ def respond(
|
|
65 |
#print(assistant)
|
66 |
messages.append({"role": "user", "content":user })
|
67 |
messages.append({"role": "assistant", "content": assistant})
|
68 |
-
|
|
|
69 |
#history from chat session
|
70 |
for val in history:
|
71 |
if val[0]:
|
@@ -111,6 +112,12 @@ demo = gr.ChatInterface(
|
|
111 |
["Why is men created?"],
|
112 |
["How is life after death?"],
|
113 |
["Please tell me about superstition!"],
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
],
|
115 |
)
|
116 |
|
|
|
36 |
messages.append({"role": "assistant", "content": row['assistant']})
|
37 |
|
38 |
#adding more references
|
39 |
+
"""selected_references = torch.load('selected_references.sav', map_location=torch.device('cpu'))
|
40 |
encoded_questions = torch.load('encoded_questions.sav', map_location=torch.device('cpu'))
|
41 |
|
42 |
task = 'Given a web search query, retrieve relevant passages that answer the query'
|
|
|
65 |
#print(assistant)
|
66 |
messages.append({"role": "user", "content":user })
|
67 |
messages.append({"role": "assistant", "content": assistant})
|
68 |
+
"""
|
69 |
+
|
70 |
#history from chat session
|
71 |
for val in history:
|
72 |
if val[0]:
|
|
|
112 |
["Why is men created?"],
|
113 |
["How is life after death?"],
|
114 |
["Please tell me about superstition!"],
|
115 |
+
["How moses defeat pharaoh?"],
|
116 |
+
["Please tell me about inheritance law in Islam!"],
|
117 |
+
["A woman not wear hijab"],
|
118 |
+
["Worshipping God beside Allah"],
|
119 |
+
["Blindly obey a person"],
|
120 |
+
["Make profit from lending money to a friend"],
|
121 |
],
|
122 |
)
|
123 |
|