Spaces:
Sleeping
Sleeping
Update app.py
Browse files308 unmodified lines3093103113123133143151 unmodified line317318319320321322323324325326327328329330331332308 unmodified linesnumbered_output = "\n".join([f"{key}: {value}" for key, value in attributes.items()])return f"Extracted Text:\n{extracted_text}\n\nAttributes and Values:\n{numbered_output}", message# Gradio Interfacedef app():return gr.TabbedInterface([1 unmodified linefn=process_image,inputs=[gr.Image(type="numpy", label="Upload Image"),gr.Dropdown(label="Mode",choices=["Entry", "Exit"],value="Exit", # Default value set to "Exit"interactive=False # Makes the dropdown non-editable, but still visible)gr.Radio(label="Entry Type", choices=["Sales", "Non-Sales"], value="Sales"),gr.Number(label="Quantity", value=1, interactive=True),],outputs=[gr.Text(label="Extracted Text"),gr.Text(label="Result")308 unmodified lines3093103113123133141 unmodified line316317318319320321322323324308 unmodified linesnumbered_output = "\n".join([f"{key}: {value}" for key, value in attributes.items()])return f"Extracted Text:\n{extracted_text}\n\nAttributes and Values:\n{numbered_output}", message# Gradio Interfacedef app():return gr.TabbedInterface([1 unmodified linefn=process_image,inputs=[gr.Image(type="numpy", label="Upload Image"),gr.Dropdown(label="Mode", choices=["Entry", "Exit"], value="Entry"),gr.Radio(label="Entry Type", choices=["Sales", "Non-Sales"], value="Sales"),gr.Number(label="Quantity", value=1, interactive=False),outputs=[gr.Text(label="Extracted Text"),gr.Text(label="Result")
app.py+2-10