evegarcianz commited on
Commit
9843fc6
1 Parent(s): 202c6e9
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -5,8 +5,8 @@ from openai.api_resources import engine
5
  import os
6
  import gradio as gr
7
 
8
- #openai.api_key=os.environ['ed_key']
9
- openai.api_key=""
10
  import pandas as pd
11
  import openai
12
  import numpy
@@ -15,8 +15,8 @@ from transformers import GPT2TokenizerFast
15
  from numpy.linalg import norm
16
  tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")
17
 
18
- key_test=os.environ['ed_key']
19
- keyshow=key_test[-5:]
20
 
21
 
22
 
@@ -233,11 +233,11 @@ def greet(question,candidate):
233
 
234
 
235
  #question=request.form['question']
236
- #contexto,respuesta=answer_query_with_context(pre,question,df_selected,context_embeddings_selected, show_prompt= True)
237
 
238
 
239
 
240
- return keyshow, 'prueaba'
241
 
242
 
243
 
 
5
  import os
6
  import gradio as gr
7
 
8
+ openai.api_key=os.environ['ed_key']
9
+ #openai.api_key=""
10
  import pandas as pd
11
  import openai
12
  import numpy
 
15
  from numpy.linalg import norm
16
  tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")
17
 
18
+ #key_test=os.environ['ed_key']
19
+ #keyshow=key_test[-5:]
20
 
21
 
22
 
 
233
 
234
 
235
  #question=request.form['question']
236
+ contexto,respuesta=answer_query_with_context(pre,question,df_selected,context_embeddings_selected, show_prompt= True)
237
 
238
 
239
 
240
+ return respuesta, contexto
241
 
242
 
243