Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def greet(string):
|
|
47 |
import datetime
|
48 |
current_time = datetime.datetime.now()
|
49 |
body = {
|
50 |
-
"arguments": {"range": "Sheet1!
|
51 |
"body": {"values": [[str(current_time)]]}
|
52 |
}
|
53 |
res = requests.post(url, json.dumps(body), headers={'Content-Type': 'application/json'})
|
@@ -138,6 +138,12 @@ def testQA(question):
|
|
138 |
answer = question_answerer(question = question, context = context['context'])['answer']
|
139 |
time3 = (datetime.now() - time).total_seconds()
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
output = coreName + ': ' + answer
|
142 |
return output
|
143 |
|
|
|
47 |
import datetime
|
48 |
current_time = datetime.datetime.now()
|
49 |
body = {
|
50 |
+
"arguments": {"range": "Sheet1!D"+str(len(df)+2), "valueInputOption": "USER_ENTERED"},
|
51 |
"body": {"values": [[str(current_time)]]}
|
52 |
}
|
53 |
res = requests.post(url, json.dumps(body), headers={'Content-Type': 'application/json'})
|
|
|
138 |
answer = question_answerer(question = question, context = context['context'])['answer']
|
139 |
time3 = (datetime.now() - time).total_seconds()
|
140 |
|
141 |
+
body = {
|
142 |
+
"arguments": {"range": "Sheet1!C"+str(len(df)+2), "valueInputOption": "USER_ENTERED"},
|
143 |
+
"body": {"values": [[answer]]}
|
144 |
+
}
|
145 |
+
res = requests.post(url, json.dumps(body), headers={'Content-Type': 'application/json'})
|
146 |
+
|
147 |
output = coreName + ': ' + answer
|
148 |
return output
|
149 |
|