Spaces:
Running
on
Zero
Running
on
Zero
Helw150
commited on
Commit
•
bf9ca9b
1
Parent(s):
7a52d3b
Test
Browse files
app.py
CHANGED
@@ -78,6 +78,7 @@ def response(state: AppState, audio: tuple):
|
|
78 |
tuple(torch.tensor(vec).cuda() for vec in tup)
|
79 |
for tup in state.model_outs.past_key_values
|
80 |
)
|
|
|
81 |
prev_outs = state.model_outs
|
82 |
start = False
|
83 |
for resp, outs in diva_audio(
|
@@ -95,8 +96,9 @@ def response(state: AppState, audio: tuple):
|
|
95 |
del outs.hidden_states
|
96 |
if spaces.config.Config.zero_gpu:
|
97 |
outs.past_key_values = tuple(
|
98 |
-
tuple(vec.cpu().numpy for vec in tup) for tup in outs.past_key_values
|
99 |
)
|
|
|
100 |
return (
|
101 |
AppState(conversation=state.conversation),
|
102 |
state.conversation,
|
|
|
78 |
tuple(torch.tensor(vec).cuda() for vec in tup)
|
79 |
for tup in state.model_outs.past_key_values
|
80 |
)
|
81 |
+
print(outs)
|
82 |
prev_outs = state.model_outs
|
83 |
start = False
|
84 |
for resp, outs in diva_audio(
|
|
|
96 |
del outs.hidden_states
|
97 |
if spaces.config.Config.zero_gpu:
|
98 |
outs.past_key_values = tuple(
|
99 |
+
tuple(vec.cpu().numpy() for vec in tup) for tup in outs.past_key_values
|
100 |
)
|
101 |
+
print(outs)
|
102 |
return (
|
103 |
AppState(conversation=state.conversation),
|
104 |
state.conversation,
|