Spaces:
Runtime error
Runtime error
Hritik
commited on
Commit
·
1cb9066
1
Parent(s):
890b2c5
add torch
Browse files
app.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
|
@@ -6,8 +11,3 @@ def greet(name):
|
|
| 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
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import torch
|
| 3 |
+
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 4 |
+
# True
|
| 5 |
+
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
| 6 |
+
# Tesla T4
|
| 7 |
|
| 8 |
def greet(name):
|
| 9 |
return "Hello " + name + "!!"
|
|
|
|
| 11 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 12 |
iface.launch()
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|