SilverDragon9 commited on
Commit
2614c61
·
1 Parent(s): 3979c51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,7 +1,12 @@
 
 
1
  import gradio as gr
2
  import joblib
3
  import pandas as pd
4
 
 
 
 
5
  # Load the saved Random Forest model
6
  rf_model = joblib.load('rf_model.pkl') # Make sure to use the actual path to your saved model
7
 
 
1
+ import os
2
+ import tempfile
3
  import gradio as gr
4
  import joblib
5
  import pandas as pd
6
 
7
+ # Set a custom directory for Gradio's temporary files
8
+ os.environ["GRADIO_TEMP"] = tempfile.mkdtemp()
9
+
10
  # Load the saved Random Forest model
11
  rf_model = joblib.load('rf_model.pkl') # Make sure to use the actual path to your saved model
12