evegarcianz commited on
Commit
587687d
1 Parent(s): 9425755

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -16
app.py CHANGED
@@ -207,34 +207,36 @@ context_embeddings=embedding_storage_to_dict('Botlitica_Meloni_Vectors.csv')
207
 
208
 
209
  def greet(question,candidate):
 
 
 
 
210
 
211
- if candidate=='Meloni':
212
- context_embeddings_selected= context_embeddings
213
- df_selected= df
214
- pre="Rispondi alla domanda come se fossi Giorgia Meloni."
215
 
216
 
217
 
218
-
219
-
220
- if candidate=='Calenda':
221
- context_embeddings_selected= context_embeddings_calenda
222
- df_selected= df_calenda
223
- pre="Rispondi alla domanda come se fossi Carlo Calenda."
224
 
225
 
226
 
227
- if candidate=='Letta':
228
- context_embeddings_selected= context_embeddings_letta
229
- df_selected= df_letta
230
- pre="Rispondi alla domanda come se fossi Enrico Letta."
231
 
232
 
233
 
234
  #question=request.form['question']
235
- contexto,respuesta=answer_query_with_context(pre,question,df_selected,context_embeddings_selected, show_prompt= True)
236
 
237
- return respuesta, contexto
 
 
 
238
 
239
 
240
 
 
207
 
208
 
209
  def greet(question,candidate):
210
+ if candidate=='Meloni':
211
+ context_embeddings_selected= context_embeddings
212
+ df_selected= df
213
+ pre="Rispondi alla domanda come se fossi Giorgia Meloni."
214
 
215
+
 
 
 
216
 
217
 
218
 
219
+ if candidate=='Calenda':
220
+ context_embeddings_selected= context_embeddings_calenda
221
+ df_selected= df_calenda
222
+ pre="Rispondi alla domanda come se fossi Carlo Calenda."
 
 
223
 
224
 
225
 
226
+ if candidate=='Letta':
227
+ context_embeddings_selected= context_embeddings_letta
228
+ df_selected= df_letta
229
+ pre="Rispondi alla domanda come se fossi Enrico Letta."
230
 
231
 
232
 
233
  #question=request.form['question']
234
+ contexto,respuesta=answer_query_with_context(pre,question,df_selected,context_embeddings_selected, show_prompt= True)
235
 
236
+
237
+
238
+ return respuesta, contexto
239
+
240
 
241
 
242