Spaces:
Runtime error
Runtime error
Hritik
commited on
Commit
·
890b2c5
1
Parent(s):
b3402e9
add torch
Browse files- app.py +6 -0
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -5,3 +5,9 @@ def greet(name):
|
|
| 5 |
|
| 6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
iface.launch()
|
| 8 |
+
|
| 9 |
+
import torch
|
| 10 |
+
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 11 |
+
# True
|
| 12 |
+
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
| 13 |
+
# Tesla T4
|
requirements.txt
CHANGED
|
@@ -17,4 +17,5 @@ opencv-python
|
|
| 17 |
decord
|
| 18 |
chardet
|
| 19 |
cchardet
|
| 20 |
-
|
|
|
|
|
|
| 17 |
decord
|
| 18 |
chardet
|
| 19 |
cchardet
|
| 20 |
+
--extra-index-url https://download.pytorch.org/whl/cu113
|
| 21 |
+
torch
|