BillBojangeles2000 commited on
Commit
b9b537e
·
1 Parent(s): 1e4c337

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import pinecone
2
-
3
  # connect to pinecone environment
4
  pinecone.init(
5
  api_key="e5d4972e-0045-43d5-a55e-efdeafe442dd",
@@ -41,9 +41,6 @@ def format_query(query, context):
41
  # contcatinate the query and context passages
42
  query = f"question: {query} context: {context}"
43
  return query
44
-
45
- from pprint import pprint
46
-
47
  def generate_answer(query):
48
  # tokenize the query to get input_ids
49
  inputs = tokenizer([query], trunication=True, max_length=1024, return_tensors="pt")
 
1
  import pinecone
2
+ from pprint import pprint
3
  # connect to pinecone environment
4
  pinecone.init(
5
  api_key="e5d4972e-0045-43d5-a55e-efdeafe442dd",
 
41
  # contcatinate the query and context passages
42
  query = f"question: {query} context: {context}"
43
  return query
 
 
 
44
  def generate_answer(query):
45
  # tokenize the query to get input_ids
46
  inputs = tokenizer([query], trunication=True, max_length=1024, return_tensors="pt")