FaroukTomori commited on
Commit
e334ddf
Β·
verified Β·
1 Parent(s): 49906d0

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +19 -0
src/streamlit_app.py CHANGED
@@ -106,6 +106,25 @@ def main():
106
  st.session_state['ai_tutor'] = ai_tutor
107
  st.success(
108
  "βœ… Fine-tuned model loaded successfully!")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  except Exception as e:
110
  st.error(
111
  f"❌ CRITICAL ERROR: Failed to load fine-tuned model")
 
106
  st.session_state['ai_tutor'] = ai_tutor
107
  st.success(
108
  "βœ… Fine-tuned model loaded successfully!")
109
+ except PermissionError as e:
110
+ st.error(
111
+ f"❌ CACHE PERMISSION ERROR: Model download blocked")
112
+ st.error(f"πŸ” Error Type: {type(e).__name__}")
113
+ st.error(f"πŸ” Error Message: {str(e)}")
114
+ st.error("πŸ” This usually means:")
115
+ st.error(
116
+ " 1. Another user is downloading the same model (wait 5-10 minutes)")
117
+ st.error(
118
+ " 2. A previous download was interrupted (cache needs clearing)")
119
+ st.error("πŸ”§ Solutions:")
120
+ st.error(" β€’ Wait 5-10 minutes and try again")
121
+ st.error(
122
+ " β€’ Restart your HF Space to clear cache")
123
+ st.error(
124
+ " β€’ The model will download automatically on retry")
125
+ st.error(
126
+ "πŸ’‘ This is temporary - the model will load once cache is cleared")
127
+ st.stop()
128
  except Exception as e:
129
  st.error(
130
  f"❌ CRITICAL ERROR: Failed to load fine-tuned model")