Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def process_file(file):
|
4 |
+
if file is not None:
|
5 |
+
return file.name
|
6 |
+
return "No file uploaded."
|
7 |
+
|
8 |
+
iface = gr.Interface(
|
9 |
+
fn=process_file,
|
10 |
+
inputs=gr.inputs.File(label="Upload your file"),
|
11 |
+
outputs="text",
|
12 |
+
live=False
|
13 |
+
)
|
14 |
+
|
15 |
+
iface.launch()
|