Spaces:
Sleeping
Sleeping
Commit
·
3f1c09a
1
Parent(s):
a75963a
Update app.py
Browse files
app.py
CHANGED
@@ -389,6 +389,8 @@ def create_prompt(question, passage):
|
|
389 |
return prompt.format(passage=passage, question=question)
|
390 |
|
391 |
def generate_answer(prompt, max_length=860, temperature=0.2):
|
|
|
|
|
392 |
inputs = tokenizer_f(prompt, return_tensors="pt", truncation=True)
|
393 |
# Start timing
|
394 |
start_time = time.time()
|
|
|
389 |
return prompt.format(passage=passage, question=question)
|
390 |
|
391 |
def generate_answer(prompt, max_length=860, temperature=0.2):
|
392 |
+
tokenizer_f = models['llm_tokenizer']
|
393 |
+
model_f = models['llm_model']
|
394 |
inputs = tokenizer_f(prompt, return_tensors="pt", truncation=True)
|
395 |
# Start timing
|
396 |
start_time = time.time()
|