Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import classifier
|
3 |
+
import home
|
4 |
+
import contact
|
5 |
+
|
6 |
+
# Define a Gradio interface
|
7 |
+
iface = gr.Interface(
|
8 |
+
fn=classifier.run, # Assuming classifier.run takes input and returns output
|
9 |
+
live=True,
|
10 |
+
capture_session=True,
|
11 |
+
show_input=False,
|
12 |
+
title="Vehicle Number Plate Recognition",
|
13 |
+
description="This page created by Himanshu Aggarwal",
|
14 |
+
)
|
15 |
+
|
16 |
+
# Add a button to navigate to Home
|
17 |
+
home_button = gr.Button("Home", click_fn=home.run)
|
18 |
+
iface.add_component(home_button, gr.Column(1))
|
19 |
+
|
20 |
+
# Add a button to navigate to Contact
|
21 |
+
contact_button = gr.Button("Contact", click_fn=contact.run)
|
22 |
+
iface.add_component(contact_button, gr.Column(1))
|
23 |
+
|
24 |
+
# Launch the Gradio interface
|
25 |
+
iface.launch()
|