Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ from flask import Flask, jsonify, request
|
|
4 |
import google.generativeai as palm
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
-
@app.route('/
|
8 |
-
def
|
9 |
data = request.get_json()
|
10 |
if 'query' not in data:
|
11 |
return jsonify({'error': 'Query parameter missing'})
|
@@ -19,21 +19,21 @@ def WEBScout_search2():
|
|
19 |
break
|
20 |
responses.append(r)
|
21 |
return jsonify(responses)
|
22 |
-
@app.route('/search', methods=['POST'])
|
23 |
-
|
24 |
-
def WEBScout2_search():
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
|
38 |
@app.route('/mws', methods=['POST'])
|
39 |
def WEBScout_search():
|
|
|
4 |
import google.generativeai as palm
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
+
@app.route('/search', methods=['POST'])
|
8 |
+
def WEBScout_search():
|
9 |
data = request.get_json()
|
10 |
if 'query' not in data:
|
11 |
return jsonify({'error': 'Query parameter missing'})
|
|
|
19 |
break
|
20 |
responses.append(r)
|
21 |
return jsonify(responses)
|
22 |
+
# @app.route('/search', methods=['POST'])
|
23 |
+
|
24 |
+
# def WEBScout2_search():
|
25 |
+
# data = request.get_json()
|
26 |
+
# if 'query' not in data:
|
27 |
+
# return jsonify({'error': 'Query parameter missing'})
|
28 |
+
|
29 |
+
# query = data['query']
|
30 |
+
# WEBS_instance = WEBS() # Instantiate WEBS without context manager
|
31 |
+
# responses = []
|
32 |
+
# for i, r in enumerate(WEBS_instance.text(query, region='wt-wt', safesearch='off', timelimit='y')):
|
33 |
+
# if i == 10: # Limiting the results to 10
|
34 |
+
# break
|
35 |
+
# responses.append(r)
|
36 |
+
# return jsonify(responses)
|
37 |
|
38 |
@app.route('/mws', methods=['POST'])
|
39 |
def WEBScout_search():
|