DerrylNessie commited on
Commit
2c4e7f5
1 Parent(s): 8a2ee58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -11,13 +11,6 @@ from numpy import asarray
11
  import numpy as np
12
 
13
  torch.hub.download_url_to_file('https://i.pinimg.com/originals/45/d0/30/45d03054e15f4be731781eecba7458a4.jpg', 'korean.jpg')
14
-
15
- def convert(img):
16
- pil_im = Image.fromarray(img)
17
- b = io.BytesIO()
18
- pil_im.save(b, 'jpeg')
19
- im_bytes = b.getvalue()
20
- return im_bytes
21
 
22
  def midpoint(x1, y1, x2, y2):
23
  x_mid = int((x1 + x2)/2)
@@ -77,7 +70,7 @@ choices = [
77
  ]
78
  gr.Interface(
79
  inference,
80
- [gr.inputs.Image(type='pil', label='Input'),gr.inputs.Dropdown(choices, type="value", default="korean", label='language')],
81
  [gr.outputs.Image(type='file', label='Output'),
82
  #gr.outputs.Image(type='file', label='Output'),
83
  #gr.outputs.Image(type='file', label='Output'),
 
11
  import numpy as np
12
 
13
  torch.hub.download_url_to_file('https://i.pinimg.com/originals/45/d0/30/45d03054e15f4be731781eecba7458a4.jpg', 'korean.jpg')
 
 
 
 
 
 
 
14
 
15
  def midpoint(x1, y1, x2, y2):
16
  x_mid = int((x1 + x2)/2)
 
70
  ]
71
  gr.Interface(
72
  inference,
73
+ [gr.inputs.Image(type='file', label='Input'),gr.inputs.Dropdown(choices, type="value", default="korean", label='language')],
74
  [gr.outputs.Image(type='file', label='Output'),
75
  #gr.outputs.Image(type='file', label='Output'),
76
  #gr.outputs.Image(type='file', label='Output'),