TerraNomaly / app.py
dropbop's picture
Update app.py
7e890c5 verified
raw
history blame
1.03 kB
import gradio as gr
import earthview as ev
import utils
import random
import pandas as pd
import os
from itertools import islice
# ... (rest of your code)
# Gradio interface (remove initial_outputs from launch)
iface = gr.Interface(
fn=rate_image,
inputs=[
gr.Textbox(label="Image ID", visible=False),
gr.Textbox(label="Bounds", visible=False),
gr.Radio(["Cool", "Not Cool"], label="Rating"),
gr.Textbox(label="Google Maps Link"),
],
outputs=[
gr.Image(label="Satellite Image"),
gr.Textbox(label="Image ID", visible=False),
gr.Textbox(label="Bounds", visible=False),
gr.Textbox(label="Google Maps Link"),
],
title="TerraNomaly - Satellite Image Labeling",
description="Rate satellite images as 'Cool' or 'Not Cool'.",
live=False,
)
# initial_image, initial_image_id, initial_bounds, initial_google_maps_link = get_next_image() # You don't need to call this here
iface.launch(
share=True # Only include valid launch arguments
)