rajivmehtadata commited on
Commit
9178e1f
1 Parent(s): 41aa7ea

Some minor changes.

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -36,13 +36,15 @@ llm=OpenAI(temperature=0.7,max_tokens=1000)
36
  print(f'Done with loading and Indexing')
37
 
38
  def procdata(name):
39
- query = "Name the negatively charged particles emitted from the cathode in the cathode ray tube?"
40
- docs = docsearch.similarity_search(query)
41
  print(f'Start Processing ... --> {name}')
42
- chain = load_qa_chain(llm, chain_type="refine")
43
- response = chain({"input_documents": docs[:3], "question": query}, return_only_outputs=True)
44
- print(f'End Processing ... --> {response}')
45
- return response
 
 
46
 
47
  iface = gr.Interface(fn=procdata, inputs="text", outputs="text",enable_queue=True)
48
  iface.launch()
 
36
  print(f'Done with loading and Indexing')
37
 
38
  def procdata(name):
39
+ # query = "Name the negatively charged particles emitted from the cathode in the cathode ray tube?"
40
+ # docs = docsearch.similarity_search(query)
41
  print(f'Start Processing ... --> {name}')
42
+ # chain = load_qa_chain(llm, chain_type="refine")
43
+ # response = chain({"input_documents": docs[:3], "question": query}, return_only_outputs=True)
44
+ # result=response['output_text'].replace('\n','')
45
+ # print(f"End Processing ... --> {result}")
46
+ # return result
47
+ return 'Done'
48
 
49
  iface = gr.Interface(fn=procdata, inputs="text", outputs="text",enable_queue=True)
50
  iface.launch()