Update app.py
Browse files
app.py
CHANGED
@@ -163,7 +163,7 @@ def create_vector_db(final_items):
|
|
163 |
Here is the antimony segment to summarize: {item}
|
164 |
"""
|
165 |
inputs = tokenizer.encode(prompt, return_tensors="pt").to(device)
|
166 |
-
response = model.generate(inputs)
|
167 |
documents.append(tokenizer.decode(response[0]))
|
168 |
|
169 |
if final_items:
|
@@ -177,7 +177,7 @@ def create_vector_db(final_items):
|
|
177 |
def generate_response(db, query_text, previous_context):
|
178 |
query_results = db.query(
|
179 |
query_texts=query_text,
|
180 |
-
n_results=
|
181 |
)
|
182 |
|
183 |
if not query_results.get('documents'):
|
|
|
163 |
Here is the antimony segment to summarize: {item}
|
164 |
"""
|
165 |
inputs = tokenizer.encode(prompt, return_tensors="pt").to(device)
|
166 |
+
response = model.generate(inputs, max_length = 100000000000)
|
167 |
documents.append(tokenizer.decode(response[0]))
|
168 |
|
169 |
if final_items:
|
|
|
177 |
def generate_response(db, query_text, previous_context):
|
178 |
query_results = db.query(
|
179 |
query_texts=query_text,
|
180 |
+
n_results=15,
|
181 |
)
|
182 |
|
183 |
if not query_results.get('documents'):
|