Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
|
|
2 |
import tensorflow as tf
|
3 |
from PIL import Image
|
4 |
import os
|
5 |
-
from huggingface_hub import hf_hub_url,
|
6 |
|
7 |
# Title of the Streamlit app
|
8 |
st.title("Yellow Rust Severity Prediction")
|
@@ -14,7 +14,7 @@ if huggingface_api_token is None:
|
|
14 |
st.stop()
|
15 |
|
16 |
# Set Hugging Face token for authentication
|
17 |
-
set_access_token(huggingface_api_token)
|
18 |
|
19 |
# Model repository details
|
20 |
model_repo_id = "shaheer-data/Yellow-Rust-Prediction"
|
|
|
2 |
import tensorflow as tf
|
3 |
from PIL import Image
|
4 |
import os
|
5 |
+
from huggingface_hub import hf_hub_url, HfApi # Import Hugging Face utilities
|
6 |
|
7 |
# Title of the Streamlit app
|
8 |
st.title("Yellow Rust Severity Prediction")
|
|
|
14 |
st.stop()
|
15 |
|
16 |
# Set Hugging Face token for authentication
|
17 |
+
HfApi().set_access_token(huggingface_api_token)
|
18 |
|
19 |
# Model repository details
|
20 |
model_repo_id = "shaheer-data/Yellow-Rust-Prediction"
|