Spaces:
Runtime error
Runtime error
paths edited
Browse files
app.py
CHANGED
|
@@ -7,11 +7,8 @@ import torchvision.transforms as T
|
|
| 7 |
import gradio as gr
|
| 8 |
from gradio import themes
|
| 9 |
|
| 10 |
-
# Current path
|
| 11 |
-
current_path = os.getcwd()
|
| 12 |
-
|
| 13 |
# Define the model path
|
| 14 |
-
model_path = os.path.join(
|
| 15 |
|
| 16 |
# Determine the device to use (GPU if available, otherwise CPU)
|
| 17 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
@@ -59,8 +56,8 @@ def predict(image: Image.Image):
|
|
| 59 |
|
| 60 |
|
| 61 |
examples = [
|
| 62 |
-
|
| 63 |
-
|
| 64 |
]
|
| 65 |
|
| 66 |
theme = gr.Theme(
|
|
|
|
| 7 |
import gradio as gr
|
| 8 |
from gradio import themes
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# Define the model path
|
| 11 |
+
model_path = os.path.join("ml", "models", "model.pt")
|
| 12 |
|
| 13 |
# Determine the device to use (GPU if available, otherwise CPU)
|
| 14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
examples = [
|
| 59 |
+
"ml/data/train_11890.jpg",
|
| 60 |
+
"ml/data/train_11716.jpg",
|
| 61 |
]
|
| 62 |
|
| 63 |
theme = gr.Theme(
|