Spaces:
Sleeping
Sleeping
Commit
·
574e2ef
1
Parent(s):
f39aba0
Add function
Browse files
app.py
CHANGED
@@ -1,9 +1,13 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.learner import load_learner
|
3 |
from fastai.vision.all import PILImage
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
import torch
|
6 |
|
|
|
|
|
|
|
7 |
def load_model():
|
8 |
# Download the model from your model repository
|
9 |
model_path = hf_hub_download(
|
|
|
1 |
+
# app.py
|
2 |
import gradio as gr
|
3 |
from fastai.learner import load_learner
|
4 |
from fastai.vision.all import PILImage
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
import torch
|
7 |
|
8 |
+
# Define the is_cat function that was used during training
|
9 |
+
def is_cat(x): return x[0].isupper()
|
10 |
+
|
11 |
def load_model():
|
12 |
# Download the model from your model repository
|
13 |
model_path = hf_hub_download(
|