Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from gradio_client import Client, handle_file
|
3 |
|
4 |
-
def upscale_image(
|
5 |
client = Client("doevent/Face-Real-ESRGAN")
|
6 |
result = client.predict(
|
7 |
-
image=handle_file(
|
8 |
size="4x",
|
9 |
api_name="/predict"
|
10 |
)
|
@@ -13,7 +13,7 @@ def upscale_image(image):
|
|
13 |
|
14 |
|
15 |
app = gr.Interface(upscale_image,
|
16 |
-
inputs = [gr.
|
17 |
outputs = [gr.Image(label="Upscaled Image")])
|
18 |
|
19 |
app.launch(debug=True)
|
|
|
1 |
import gradio as gr
|
2 |
from gradio_client import Client, handle_file
|
3 |
|
4 |
+
def upscale_image(url):
|
5 |
client = Client("doevent/Face-Real-ESRGAN")
|
6 |
result = client.predict(
|
7 |
+
image=handle_file(url), # Directly pass the image
|
8 |
size="4x",
|
9 |
api_name="/predict"
|
10 |
)
|
|
|
13 |
|
14 |
|
15 |
app = gr.Interface(upscale_image,
|
16 |
+
inputs = [gr.Textbox(label="Url")],
|
17 |
outputs = [gr.Image(label="Upscaled Image")])
|
18 |
|
19 |
app.launch(debug=True)
|