Spaces:
Sleeping
Sleeping
Roberta2024
commited on
Commit
•
b6c3f96
1
Parent(s):
4def369
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def initialize(file_path, question):
|
|
41 |
mistral_prompt = f"Based on this answer: {gemini_answer}\nGenerate a follow-up question:"
|
42 |
mistral_inputs = mistral_tokenizer.encode(mistral_prompt, return_tensors='pt').to(device)
|
43 |
with torch.no_grad():
|
44 |
-
mistral_outputs = mistral_model.generate(mistral_inputs, max_length=
|
45 |
mistral_output = mistral_tokenizer.decode(mistral_outputs[0], skip_special_tokens=True)
|
46 |
|
47 |
combined_output = f"Gemini Answer: {gemini_answer}\n\nMistral Follow-up: {mistral_output}"
|
|
|
41 |
mistral_prompt = f"Based on this answer: {gemini_answer}\nGenerate a follow-up question:"
|
42 |
mistral_inputs = mistral_tokenizer.encode(mistral_prompt, return_tensors='pt').to(device)
|
43 |
with torch.no_grad():
|
44 |
+
mistral_outputs = mistral_model.generate(mistral_inputs, max_length=150)
|
45 |
mistral_output = mistral_tokenizer.decode(mistral_outputs[0], skip_special_tokens=True)
|
46 |
|
47 |
combined_output = f"Gemini Answer: {gemini_answer}\n\nMistral Follow-up: {mistral_output}"
|