Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,13 +2,13 @@ import gradio as gr
|
|
2 |
from fastai.text.all import load_learner
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
|
5 |
-
# Step 8: Download the model from Hugging Face and load
|
6 |
def load_model():
|
7 |
try:
|
8 |
-
# Download the
|
9 |
model_path = hf_hub_download(
|
10 |
repo_id="rahul7star/fastai-rahul-text-model-v02",
|
11 |
-
filename="rahul9star.
|
12 |
)
|
13 |
|
14 |
# Load the model using FastAI's load_learner method
|
|
|
2 |
from fastai.text.all import load_learner
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
|
5 |
+
# Step 8: Download the model from Hugging Face and load it
|
6 |
def load_model():
|
7 |
try:
|
8 |
+
# Download the .pth file from Hugging Face
|
9 |
model_path = hf_hub_download(
|
10 |
repo_id="rahul7star/fastai-rahul-text-model-v02",
|
11 |
+
filename="rahul9star.pth"
|
12 |
)
|
13 |
|
14 |
# Load the model using FastAI's load_learner method
|