File size: 1,031 Bytes
465c443
63711ea
7d5835f
80acacc
7d5835f
63711ea
5ec1d6a
7c425bb
7e890c5
7d5835f
7e890c5
7d5835f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7e890c5
7d5835f
 
7e890c5
7d5835f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
)