wfranco commited on
Commit
1d37909
·
1 Parent(s): 787a70a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -18
app.py CHANGED
@@ -1,18 +1,8 @@
1
- import gradio as gr
2
-
3
- def read_pdf(file_obj):
4
- # Here, file_obj is a file object that Gradio passes to the function.
5
- # You can read this file object using a PDF reading library, such as PyPDF2 or pdfplumber.
6
- # For illustration, replace the following line with your own PDF processing logic.
7
- text = "Processed PDF content here"
8
- return text
9
-
10
- iface = gr.Interface(
11
- fn=read_pdf,
12
- inputs=gr.inputs.File(type="file", label="Upload PDF"),
13
- outputs="text",
14
- title="PDF Processor",
15
- description="Upload a PDF file to process."
16
- )
17
-
18
- iface.launch()
 
1
+ #!pip install gradio
2
+ import gradio as gra
3
+ def user_greeting(name):
4
+ return "Hi! " + name + " Welcome to your first Gradio application!😎"
5
+
6
+ #define gradio interface and other parameters
7
+ app = gra.Interface(fn = user_greeting, inputs="text", outputs="text")
8
+ app.launch()