saba000farahani commited on
Commit
92156a5
·
verified ·
1 Parent(s): 170bac3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -24,12 +24,12 @@ scaler_path = os.path.join(script_dir, 'toolkit', 'scaler_X.json')
24
  rf_model_path = os.path.join(script_dir, 'toolkit', 'rf_model.joblib')
25
  mlp_model_path = os.path.join(script_dir, 'toolkit', 'mlp_model.keras')
26
  meta_model_path = os.path.join(script_dir, 'toolkit', 'meta_model.joblib')
27
- image_path = os.path.join(script_dir, 'toolkit', 'car.png')
28
 
29
  # Load the scaler and models
30
  try:
31
  # Load the scaler
32
- with open(scaler_path, 'r') as f:
33
  scaler_params = json.load(f)
34
  scaler_X = MinMaxScaler()
35
  scaler_X.scale_ = np.array(scaler_params["scale_"])
@@ -120,7 +120,9 @@ interface = gr.Interface(
120
  )
121
 
122
  with gr.Blocks() as demo:
123
- gr.Image(image_path, width=500, height=300) # Adjust the width and height as needed
124
- interface.render()
 
 
125
 
126
  demo.launch()
 
24
  rf_model_path = os.path.join(script_dir, 'toolkit', 'rf_model.joblib')
25
  mlp_model_path = os.path.join(script_dir, 'toolkit', 'mlp_model.keras')
26
  meta_model_path = os.path.join(script_dir, 'toolkit', 'meta_model.joblib')
27
+ image_path = os.path.join(script_dir, 'toolkit', 'Picture1.png')
28
 
29
  # Load the scaler and models
30
  try:
31
  # Load the scaler
32
+ with open(scaler_path, 'r') as f):
33
  scaler_params = json.load(f)
34
  scaler_X = MinMaxScaler()
35
  scaler_X.scale_ = np.array(scaler_params["scale_"])
 
120
  )
121
 
122
  with gr.Blocks() as demo:
123
+ with gr.Row():
124
+ interface.render()
125
+ with gr.Row():
126
+ gr.Image(image_path, width=500, height=300) # Adjust the width and height as needed
127
 
128
  demo.launch()