Spaces:
Sleeping
Sleeping
trial hosting
Browse files- app.py +4 -4
- qnabackend/resources/routes.py +1 -0
app.py
CHANGED
@@ -8,8 +8,8 @@ def home():
|
|
8 |
return "hello world"
|
9 |
|
10 |
|
11 |
-
if __name__ == '__main__':
|
12 |
-
app.run(debug = True, port = 5000)
|
13 |
-
|
14 |
# if __name__ == '__main__':
|
15 |
-
# app.run(debug =
|
|
|
|
|
|
|
|
8 |
return "hello world"
|
9 |
|
10 |
|
|
|
|
|
|
|
11 |
# if __name__ == '__main__':
|
12 |
+
# app.run(debug = True, port = 5000)
|
13 |
+
|
14 |
+
if __name__ == '__main__':
|
15 |
+
app.run(debug = False, host = "0.0.0.0", port = 7860)
|
qnabackend/resources/routes.py
CHANGED
@@ -10,6 +10,7 @@ class Backend(Resource):
|
|
10 |
url = request.json['url']
|
11 |
question = request.json['question']
|
12 |
|
|
|
13 |
answer = getAnswer(url, question)
|
14 |
|
15 |
return {'question' : question, 'answer' : answer}
|
|
|
10 |
url = request.json['url']
|
11 |
question = request.json['question']
|
12 |
|
13 |
+
print(url, question)
|
14 |
answer = getAnswer(url, question)
|
15 |
|
16 |
return {'question' : question, 'answer' : answer}
|