ovi054 commited on
Commit
eadd7ea
·
verified ·
1 Parent(s): 7056a5c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio_client import Client, handle_file
3
+
4
+ def upscale_image(image):
5
+ client = Client("doevent/Face-Real-ESRGAN")
6
+ result = client.predict(
7
+ image=handle_file(image), # Directly pass the image
8
+ size="2x",
9
+ api_name="/predict"
10
+ )
11
+ return result
12
+
13
+
14
+ app = gr.Interface(upscale_image,
15
+ inputs = [gr.Image(type="filepath", label="Upload Image")],
16
+ outputs = [gr.Image(label="Upscaled Image")])
17
+
18
+ app.launch(debug=True)