sudo-soldier commited on
Commit
49704b9
·
verified ·
1 Parent(s): d3acb13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -39,11 +39,10 @@ with gr.Blocks() as demo:
39
 
40
  def handle_model_input(selected_model):
41
  if selected_model:
42
- print(f"Loading model: {selected_model}")
43
- return selected_model
44
 
45
- model_input.change(handle_model_input, inputs=model_input, outputs=model_output)
46
- model_input.change(load_mesh_with_info, inputs=model_input, outputs=[model_output, file_info])
47
 
48
  examples = gr.Examples(
49
  examples=[
@@ -67,3 +66,4 @@ if __name__ == "__main__":
67
 
68
 
69
 
 
 
39
 
40
  def handle_model_input(selected_model):
41
  if selected_model:
42
+ file_info_str = f"File: {os.path.basename(selected_model)}, Size: {os.path.getsize(selected_model) / 1024:.2f} KB"
43
+ return selected_model, file_info_str
44
 
45
+ model_input.change(handle_model_input, inputs=model_input, outputs=[model_output, file_info])
 
46
 
47
  examples = gr.Examples(
48
  examples=[
 
66
 
67
 
68
 
69
+