Spaces:
Running
Running
Create app.py
Browse files
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)
|