Spaces:
Runtime error
Runtime error
Commit
·
f83222b
1
Parent(s):
db373f8
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,14 @@ text = list(df["text"].values)
|
|
8 |
|
9 |
def chitti(query):
|
10 |
re_table = search(query, text)
|
11 |
-
|
|
|
|
|
12 |
|
13 |
demo = gr.Interface(
|
14 |
fn=chitti,
|
15 |
inputs=["text"],
|
16 |
-
outputs=["text"],
|
17 |
)
|
18 |
demo.launch()
|
19 |
|
|
|
8 |
|
9 |
def chitti(query):
|
10 |
re_table = search(query, text)
|
11 |
+
with open(query[0:5]+'.txt', 'w') as f:
|
12 |
+
f.writelines(["Question: "+query,"Ans 1 : "+ re_table[0][0],"Ans 2 : "+ re_table[1][0]])
|
13 |
+
return [re_table[0][0],re_table[1][0]]
|
14 |
|
15 |
demo = gr.Interface(
|
16 |
fn=chitti,
|
17 |
inputs=["text"],
|
18 |
+
outputs=["text","text"],
|
19 |
)
|
20 |
demo.launch()
|
21 |
|