methestrikerx100 commited on
Commit
aaf8b9e
·
verified ·
1 Parent(s): d71bbab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -184,25 +184,20 @@ with gr.Blocks(
184
  ) as demo:
185
  gr.Markdown(DESCRIPTION)
186
 
187
- # Your existing code for creating the interface components
188
  with gr.Row():
189
  image_input = gr.Image(elem_id="image_input", type="pil")
190
  output_components = [
191
  gr.Textbox(label="Mineral Name", elem_id="predicted_class_name"),
192
  gr.Textbox(label="Prediction Scores of Model", elem_id="predicted_scores", lines=5),
193
- gr.Textbox(label="Key Facts About Mineral", elem_id="mineral_key_facts", lines=8)
194
  ]
195
  image_button = gr.Button("Classify Mineral")
196
  image_button.click(classify_image, inputs=image_input, outputs=output_components)
197
 
198
- with gr.Row():
199
- gr.Textbox(label="Mineral Detection", elem_id="mineral_detection_output", lines=3)
200
- gr.Textbox(label="Mineral Classification", elem_id="mineral_classification_output", lines=3)
201
- gr.Textbox(label="Mineral Key Facts", elem_id="mineral_key_facts_output", lines=8)
202
  gr.Examples(
203
- examples=[r"C:\Users\nanom\OneDrive\Desktop\Gradio UI\pixlr-image-generator-29d31d6c-51c8-48ac-a157-d893fe98dec0.png"],
204
  inputs=image_input,
205
-
206
-
207
  )
208
- demo.launch( auth_message="Welcome To Mineral Identification App.")
 
 
184
  ) as demo:
185
  gr.Markdown(DESCRIPTION)
186
 
187
+ # Create interface components
188
  with gr.Row():
189
  image_input = gr.Image(elem_id="image_input", type="pil")
190
  output_components = [
191
  gr.Textbox(label="Mineral Name", elem_id="predicted_class_name"),
192
  gr.Textbox(label="Prediction Scores of Model", elem_id="predicted_scores", lines=5),
193
+ gr.Textbox(label="Key Facts About Mineral", elem_id="mineral_key_facts", lines=8),
194
  ]
195
  image_button = gr.Button("Classify Mineral")
196
  image_button.click(classify_image, inputs=image_input, outputs=output_components)
197
 
 
 
 
 
198
  gr.Examples(
199
+ examples=["Gradio examples/Biotite1.jpg", "Gradio examples/Biotite2.jpg", "Gradio examples/Olivine1.jpg", "Gradio examples/Plagioclase1.jpg"],
200
  inputs=image_input,
 
 
201
  )
202
+
203
+ demo.launch(auth_message="Welcome to the Mineral Identification App.")