Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import torch
|
|
|
2 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
3 |
# True
|
4 |
if torch.cuda.is_available():
|
@@ -193,7 +194,7 @@ def display_tree(start_sentence, scores, sequences, beam_indices):
|
|
193 |
"""
|
194 |
return display
|
195 |
|
196 |
-
|
197 |
def get_tables(input_text, number_steps, number_beams):
|
198 |
inputs = tokenizer([input_text], return_tensors="pt")
|
199 |
|
|
|
1 |
import torch
|
2 |
+
import spaces
|
3 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
4 |
# True
|
5 |
if torch.cuda.is_available():
|
|
|
194 |
"""
|
195 |
return display
|
196 |
|
197 |
+
@spaces.GPU
|
198 |
def get_tables(input_text, number_steps, number_beams):
|
199 |
inputs = tokenizer([input_text], return_tensors="pt")
|
200 |
|