Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import numpy as np
|
|
5 |
|
6 |
labels = ['Birch Forest', 'Cave', 'Cherry Grove', 'Dark Forest', 'Deep Dark', 'Desert', 'End', 'Forest', 'Jungle', 'Mushroom Fields', 'Nether', 'Ocean', 'Plains', 'Savanna', 'Swamp', 'Taiga']
|
7 |
|
8 |
-
def
|
9 |
if uploaded_file is None:
|
10 |
return "No file uploaded.", None, "No prediction"
|
11 |
|
@@ -26,7 +26,7 @@ def predict_pokemon_type(uploaded_file):
|
|
26 |
|
27 |
# Define the Gradio interface
|
28 |
iface = gr.Interface(
|
29 |
-
fn=
|
30 |
inputs=gr.File(label="Upload File"), # File upload widget
|
31 |
outputs=["image", "text"], # Output types for image and text
|
32 |
title="Minecraft Biomes Classifier", # Title of the interface
|
|
|
5 |
|
6 |
labels = ['Birch Forest', 'Cave', 'Cherry Grove', 'Dark Forest', 'Deep Dark', 'Desert', 'End', 'Forest', 'Jungle', 'Mushroom Fields', 'Nether', 'Ocean', 'Plains', 'Savanna', 'Swamp', 'Taiga']
|
7 |
|
8 |
+
def predict_biome(uploaded_file):
|
9 |
if uploaded_file is None:
|
10 |
return "No file uploaded.", None, "No prediction"
|
11 |
|
|
|
26 |
|
27 |
# Define the Gradio interface
|
28 |
iface = gr.Interface(
|
29 |
+
fn=predict_biome, # Function to process the input
|
30 |
inputs=gr.File(label="Upload File"), # File upload widget
|
31 |
outputs=["image", "text"], # Output types for image and text
|
32 |
title="Minecraft Biomes Classifier", # Title of the interface
|