ovi054 commited on
Commit
5079107
·
verified ·
1 Parent(s): 7f8918e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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(image):
5
  client = Client("doevent/Face-Real-ESRGAN")
6
  result = client.predict(
7
- image=handle_file(image), # Directly pass the image
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.Image(label="Upload Image", type="filepath")],
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)