chatfed_whisp / app.py
leavoigt's picture
add preprocessing function
a576faa
raw
history blame
722 Bytes
import gradio as gr
import json
from utils.main_processor import get_statistics
# Interface
with gr.Blocks() as ui:
with gr.Row():
with gr.Column():
file_input = gr.File(file_types=[".geojson"])
submit_btn = gr.Button("Submit")
with gr.Column():
output = gr.Text()
# Second row for additional outputs
#with gr.Row():
# statistics_output = gr.Dataframe(label="Statistics Summary")
# Submit button action
submit_btn.click(get_statistics,
file_input, output)
# Launch app
if __name__ == "__main__":
ui.launch(
server_name="0.0.0.0",
server_port=7860,
#mcp_server=True,
show_error=True
)