shaheer-data commited on
Commit
1738230
·
verified ·
1 Parent(s): 1ca6951

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, set_access_token # Import Hugging Face utilities
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"