Spaces:
Runtime error
Runtime error
Commit
·
6aaa0dd
1
Parent(s):
002f7b6
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def generate(title, abstract):
|
|
72 |
f"### Human: {prompt + doc} \n"
|
73 |
f"### Assistant:"
|
74 |
)
|
75 |
-
inputs = tok(formatted_prompt, return_tensors="pt")
|
76 |
outputs = m.generate(inputs=inputs.input_ids, max_new_tokens=300)
|
77 |
output = tok.decode(outputs[0], skip_special_tokens=True)
|
78 |
index_response = output.find("### Assistant: ") + 15
|
@@ -122,7 +122,7 @@ def generate(title, abstract):
|
|
122 |
f"### Human: {prompt} \n"
|
123 |
f"### Assistant:"
|
124 |
)
|
125 |
-
inputs = tok(formatted_prompt, return_tensors="pt")
|
126 |
outputs = m.generate(inputs=inputs.input_ids, max_new_tokens=300)
|
127 |
output = tok.decode(outputs[0], skip_special_tokens=True)
|
128 |
index_response = output.find("### Assistant: ") + 15
|
|
|
72 |
f"### Human: {prompt + doc} \n"
|
73 |
f"### Assistant:"
|
74 |
)
|
75 |
+
inputs = tok(formatted_prompt, return_tensors="pt")#.to("cuda:1")
|
76 |
outputs = m.generate(inputs=inputs.input_ids, max_new_tokens=300)
|
77 |
output = tok.decode(outputs[0], skip_special_tokens=True)
|
78 |
index_response = output.find("### Assistant: ") + 15
|
|
|
122 |
f"### Human: {prompt} \n"
|
123 |
f"### Assistant:"
|
124 |
)
|
125 |
+
inputs = tok(formatted_prompt, return_tensors="pt")#.to("cuda:2")
|
126 |
outputs = m.generate(inputs=inputs.input_ids, max_new_tokens=300)
|
127 |
output = tok.decode(outputs[0], skip_special_tokens=True)
|
128 |
index_response = output.find("### Assistant: ") + 15
|