Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
6bb8448
1
Parent(s):
b3fd403
fix
Browse files
utils/__pycache__/interface.cpython-310.pyc
CHANGED
|
Binary files a/utils/__pycache__/interface.cpython-310.pyc and b/utils/__pycache__/interface.cpython-310.pyc differ
|
|
|
utils/interface.py
CHANGED
|
@@ -67,9 +67,7 @@ class Inference:
|
|
| 67 |
# This should always be exactly one modality based on task
|
| 68 |
if len(output_modalities) != 1:
|
| 69 |
raise ValueError("Expected exactly one output modality based on task.")
|
| 70 |
-
|
| 71 |
-
inputs = self.processor([full_conversation], output_modalities)
|
| 72 |
-
|
| 73 |
stopping_criteria = [
|
| 74 |
MIMOStopper(self.processor.tokenizer.pad_token_id),
|
| 75 |
MIMOStopper(
|
|
@@ -91,7 +89,8 @@ class Inference:
|
|
| 91 |
|
| 92 |
@spaces.GPU(duration = 120)
|
| 93 |
def gen_spaces():
|
| 94 |
-
|
|
|
|
| 95 |
token_ids = self.model.generate(
|
| 96 |
input_ids=inputs["input_ids"].to(self.device),
|
| 97 |
attention_mask=inputs["attention_mask"].to(self.device),
|
|
|
|
| 67 |
# This should always be exactly one modality based on task
|
| 68 |
if len(output_modalities) != 1:
|
| 69 |
raise ValueError("Expected exactly one output modality based on task.")
|
| 70 |
+
|
|
|
|
|
|
|
| 71 |
stopping_criteria = [
|
| 72 |
MIMOStopper(self.processor.tokenizer.pad_token_id),
|
| 73 |
MIMOStopper(
|
|
|
|
| 89 |
|
| 90 |
@spaces.GPU(duration = 120)
|
| 91 |
def gen_spaces():
|
| 92 |
+
inputs = self.processor([full_conversation], output_modalities)
|
| 93 |
+
|
| 94 |
token_ids = self.model.generate(
|
| 95 |
input_ids=inputs["input_ids"].to(self.device),
|
| 96 |
attention_mask=inputs["attention_mask"].to(self.device),
|