Sushrut98 commited on
Commit
855bfa5
·
verified ·
1 Parent(s): 33022cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -1,9 +1,8 @@
1
- # %%writefile demos/app.py
2
  ### 1. Imports and class names setup ###
3
  import gradio as gr
4
  import os
5
  import torch
6
- # from model import TinyCNN
7
  from timeit import default_timer as timer
8
  from typing import Tuple, Dict
9
  import torch
@@ -66,12 +65,12 @@ def predict(img) -> Tuple[Dict, float]:
66
  ### 4. Gradio app ###
67
 
68
  # Create title, description and article strings
69
- title = "Expression Detection"
70
- description = "An app to predict emotions from the list.[Angry, Disgust, Fear, Happy, Neutral, Sad, Surprise]"
71
- article = "Created as a college project."
72
 
73
  # Create examples list from "examples/" directory
74
- # example_list = [["examples/" + example] for example in os.listdir("examples")]
75
 
76
  # Create Gradio interface
77
  demo = gr.Interface(
@@ -81,10 +80,10 @@ demo = gr.Interface(
81
  gr.Label(num_top_classes=5, label="Predictions"),
82
  gr.Number(label="Prediction time (s)"),
83
  ],
84
- # examples=example_list,
85
  title=title,
86
  description=description,
87
- article=article,
88
  )
89
 
90
  # Launch the app!
 
 
1
  ### 1. Imports and class names setup ###
2
  import gradio as gr
3
  import os
4
  import torch
5
+ from model import TinyCNN
6
  from timeit import default_timer as timer
7
  from typing import Tuple, Dict
8
  import torch
 
65
  ### 4. Gradio app ###
66
 
67
  # Create title, description and article strings
68
+ title = "Wafer Defect Detection"
69
+ description = "An app to predict Wafer Defects in semiconductors.[Center, Donut, Edge-Loc, Edge-Ring, Loc, Near-full, Random, Scratch, none]"
70
+
71
 
72
  # Create examples list from "examples/" directory
73
+ example_list = [["example/" + example] for example in os.listdir("example")]
74
 
75
  # Create Gradio interface
76
  demo = gr.Interface(
 
80
  gr.Label(num_top_classes=5, label="Predictions"),
81
  gr.Number(label="Prediction time (s)"),
82
  ],
83
+ examples=example_list,
84
  title=title,
85
  description=description,
86
+
87
  )
88
 
89
  # Launch the app!