Spaces:
Sleeping
Sleeping
Taejun Kim
commited on
Commit
·
1aa0f5b
1
Parent(s):
edc3710
Use torch with cuda
Browse files- app.py +0 -7
- pre-requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,7 +1,3 @@
|
|
| 1 |
-
import torch
|
| 2 |
-
|
| 3 |
-
print(f'=> is cuda available: {torch.cuda.is_available()}')
|
| 4 |
-
|
| 5 |
import gradio as gr
|
| 6 |
import os
|
| 7 |
import allin1
|
|
@@ -52,9 +48,6 @@ CACHE_EXAMPLES = os.getenv('CACHE_EXAMPLES', '1') == '1'
|
|
| 52 |
|
| 53 |
|
| 54 |
def analyze(path):
|
| 55 |
-
import torch
|
| 56 |
-
print(f'=> is cuda available: {torch.cuda.is_available()}')
|
| 57 |
-
|
| 58 |
path = Path(path)
|
| 59 |
result = allin1.analyze(
|
| 60 |
path,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import allin1
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
def analyze(path):
|
|
|
|
|
|
|
|
|
|
| 51 |
path = Path(path)
|
| 52 |
result = allin1.analyze(
|
| 53 |
path,
|
pre-requirements.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 2 |
torch==2.0.1
|
| 3 |
torchaudio
|
|
|
|
| 1 |
+
# --extra-index-url https://download.pytorch.org/whl/cpu
|
| 2 |
torch==2.0.1
|
| 3 |
torchaudio
|