feng2022 commited on
Commit
27f8154
1 Parent(s): acce928

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -33,7 +33,7 @@ spectral_sensitivity = 'b'
33
  TITLE = 'Time-TravelRephotography'
34
  DESCRIPTION = '''This is an unofficial demo for https://github.com/Time-Travel-Rephotography.
35
  '''
36
- ARTICLE = '<center><img src="https://visitor-badge.glitch.me/badge?page_id=hysts.stylegan-human" alt="visitor badge"/></center>'
37
 
38
  TOKEN = "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"
39
 
@@ -94,13 +94,20 @@ def main():
94
  img_out, _, _ = generator([latent])
95
  imgs_arr = make_image(img_out)
96
  iface = gr.Interface(
97
- fn=predict,
98
- inputs='text',
99
- outputs='text',
100
- examples=['result']
 
 
 
101
  )
102
 
103
- iface.launch()
 
 
 
 
104
 
105
  if __name__ == '__main__':
106
  main()
 
33
  TITLE = 'Time-TravelRephotography'
34
  DESCRIPTION = '''This is an unofficial demo for https://github.com/Time-Travel-Rephotography.
35
  '''
36
+ ARTICLE = '<center><img src="https://visitor-badge.glitch.me/badge?page_id=Time-TravelRephotography" alt="visitor badge"/></center>'
37
 
38
  TOKEN = "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"
39
 
 
94
  img_out, _, _ = generator([latent])
95
  imgs_arr = make_image(img_out)
96
  iface = gr.Interface(
97
+ gr.outputs.Image(type='numpy', label='Output'),
98
+ title=TITLE,
99
+ description=DESCRIPTION,
100
+ article=ARTICLE,
101
+ theme=args.theme,
102
+ allow_flagging=args.allow_flagging,
103
+ live=args.live,
104
  )
105
 
106
+ iface.launch(
107
+ enable_queue=args.enable_queue,
108
+ server_port=args.port,
109
+ share=args.share,
110
+ )
111
 
112
  if __name__ == '__main__':
113
  main()