gpcerv commited on
Commit
5761aed
1 Parent(s): 97ace17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -42,13 +42,7 @@ def flask_app():
42
  return '<br>' \
43
  '<h3><a href="https://www.aubaypoc.altervista.org/chatpdf/" target="_blank">Hai acceso il server! Bene!&#128521 Adesso vai alla pagina CHAT whith my PDF!!</a></h3>' \
44
 
45
-
46
-
47
- @app.route('/requestsSearch',methods=['POST','GET'])
48
- @support_jsonp
49
- def tasksSearch():
50
- domanda=request.args.get('frase').strip()
51
- print('domanda',domanda)
52
  dati=[]
53
  with open ('static/encodedT', 'rb') as fp:
54
  word = pickle.load(fp)
@@ -102,7 +96,15 @@ def tasksSearch():
102
  text=''
103
  if conta>3:
104
  usc=True
105
- w=text
 
 
 
 
 
 
 
 
106
  d={}
107
  d['text']=str(w)
108
  d['chi']=out
 
42
  return '<br>' \
43
  '<h3><a href="https://www.aubaypoc.altervista.org/chatpdf/" target="_blank">Hai acceso il server! Bene!&#128521 Adesso vai alla pagina CHAT whith my PDF!!</a></h3>' \
44
 
45
+ def ricerca(domanda):
 
 
 
 
 
 
46
  dati=[]
47
  with open ('static/encodedT', 'rb') as fp:
48
  word = pickle.load(fp)
 
96
  text=''
97
  if conta>3:
98
  usc=True
99
+ w=text
100
+ return w,out
101
+
102
+ @app.route('/requestsSearch',methods=['POST','GET'])
103
+ @support_jsonp
104
+ def tasksSearch():
105
+ domanda=request.args.get('frase').strip()
106
+ print('domanda',domanda)
107
+ w,out=ricerca(domanda)
108
  d={}
109
  d['text']=str(w)
110
  d['chi']=out