added spaces
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import uuid
|
|
8 |
import transformers
|
9 |
import torch
|
10 |
import time
|
|
|
11 |
|
12 |
from nemo.collections.asr.models import ASRModel
|
13 |
|
@@ -142,6 +143,8 @@ def bot(history,message):
|
|
142 |
time.sleep(0.05)
|
143 |
yield history
|
144 |
|
|
|
|
|
145 |
def bot_response(message: str,
|
146 |
history: list,
|
147 |
temperature: float,
|
@@ -184,7 +187,7 @@ def bot_response(message: str,
|
|
184 |
outputs = []
|
185 |
for text in streamer:
|
186 |
outputs.append(text)
|
187 |
-
|
188 |
return "".join(outputs)
|
189 |
|
190 |
|
|
|
8 |
import transformers
|
9 |
import torch
|
10 |
import time
|
11 |
+
import spaces
|
12 |
|
13 |
from nemo.collections.asr.models import ASRModel
|
14 |
|
|
|
143 |
time.sleep(0.05)
|
144 |
yield history
|
145 |
|
146 |
+
|
147 |
+
@spaces.GPU(duration=120)
|
148 |
def bot_response(message: str,
|
149 |
history: list,
|
150 |
temperature: float,
|
|
|
187 |
outputs = []
|
188 |
for text in streamer:
|
189 |
outputs.append(text)
|
190 |
+
|
191 |
return "".join(outputs)
|
192 |
|
193 |
|