Jahnavibh Claude commited on
Commit
4fde660
·
1 Parent(s): b5d8019

Remove upload TFLite model section from MobileNetDemo

Browse files

- Removed 'Upload Your TFLite Model' card and functionality
- Cleaned up UI to focus on core classification demo
- Removed model compilation event handlers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Files changed (1) hide show
  1. app.py +0 -35
app.py CHANGED
@@ -580,35 +580,6 @@ with gr.Blocks(
580
  example_car = gr.Button("Car", size="sm", elem_classes=["btn-example"])
581
  example_food = gr.Button("Food", size="sm", elem_classes=["btn-example"])
582
 
583
- # Add Model Upload Section
584
- with gr.Group(elem_classes=["card"]):
585
- gr.HTML('<div class="card-header"><span style="color: white; font-weight: 600;">Upload Your TFLite Model</span></div>')
586
-
587
- with gr.Column(elem_classes=["card-content"]):
588
- model_file = gr.File(
589
- file_types=[".tflite"],
590
- label="Upload .tflite model for Vela analysis",
591
- interactive=True
592
- )
593
-
594
- compile_btn = gr.Button(
595
- "Compile Model for SR110",
596
- variant="primary",
597
- size="lg",
598
- elem_classes=["btn-primary"]
599
- )
600
-
601
- download_model_btn = gr.DownloadButton(
602
- label="Download Compiled Model",
603
- visible=False,
604
- elem_classes=["btn-primary"]
605
- )
606
-
607
- download_logs_btn = gr.DownloadButton(
608
- label="Download Per Layer Logs",
609
- visible=False,
610
- elem_classes=["btn-primary"]
611
- )
612
 
613
  with gr.Column(scale=1):
614
  # Display Vela analysis results (dynamic)
@@ -637,12 +608,6 @@ with gr.Blocks(
637
  example_car.click(lambda: load_example_image("Car"), outputs=input_image)
638
  example_food.click(lambda: load_example_image("Food"), outputs=input_image)
639
 
640
- # Model compile handler
641
- compile_btn.click(
642
- fn=compile_uploaded_model,
643
- inputs=[model_file],
644
- outputs=[vela_results_html, download_model_btn, download_logs_btn]
645
- )
646
 
647
  # Auto-classify when image is uploaded
648
  input_image.change(
 
580
  example_car = gr.Button("Car", size="sm", elem_classes=["btn-example"])
581
  example_food = gr.Button("Food", size="sm", elem_classes=["btn-example"])
582
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
583
 
584
  with gr.Column(scale=1):
585
  # Display Vela analysis results (dynamic)
 
608
  example_car.click(lambda: load_example_image("Car"), outputs=input_image)
609
  example_food.click(lambda: load_example_image("Food"), outputs=input_image)
610
 
 
 
 
 
 
 
611
 
612
  # Auto-classify when image is uploaded
613
  input_image.change(