Spaces:
Runtime error
Runtime error
Commit ·
2ae9e51
1
Parent(s): f74728a
update
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import spaces
|
| 2 |
|
| 3 |
import os
|
| 4 |
|
|
@@ -92,7 +92,7 @@ class Chat:
|
|
| 92 |
state.append_message(state.roles[1], None)
|
| 93 |
return state
|
| 94 |
|
| 95 |
-
@spaces.GPU(duration=120)
|
| 96 |
@torch.inference_mode()
|
| 97 |
def generate(self, tensor: list, modals: list, prompt: str, first_run: bool, state, temperature, top_p, max_output_tokens):
|
| 98 |
# TODO: support multiple turns of conversation.
|
|
@@ -132,7 +132,7 @@ class Chat:
|
|
| 132 |
return outputs, state
|
| 133 |
|
| 134 |
|
| 135 |
-
@spaces.GPU(duration=120)
|
| 136 |
def generate(image, video, state, state_, textbox_in, temperature, top_p, max_output_tokens, dtype=torch.float16):
|
| 137 |
if not textbox_in:
|
| 138 |
if len(state_.messages) > 0:
|
|
|
|
| 1 |
+
#import spaces
|
| 2 |
|
| 3 |
import os
|
| 4 |
|
|
|
|
| 92 |
state.append_message(state.roles[1], None)
|
| 93 |
return state
|
| 94 |
|
| 95 |
+
# @spaces.GPU(duration=120)
|
| 96 |
@torch.inference_mode()
|
| 97 |
def generate(self, tensor: list, modals: list, prompt: str, first_run: bool, state, temperature, top_p, max_output_tokens):
|
| 98 |
# TODO: support multiple turns of conversation.
|
|
|
|
| 132 |
return outputs, state
|
| 133 |
|
| 134 |
|
| 135 |
+
#@spaces.GPU(duration=120)
|
| 136 |
def generate(image, video, state, state_, textbox_in, temperature, top_p, max_output_tokens, dtype=torch.float16):
|
| 137 |
if not textbox_in:
|
| 138 |
if len(state_.messages) > 0:
|