cagataydag commited on
Commit
375a357
·
1 Parent(s): b176960

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -404,10 +404,20 @@ with blocks:
404
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2108.00946' target='_blank'>StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators</a> | <a href='https://stylegan-nada.github.io/' target='_blank'>Project Page</a> | <a href='https://github.com/rinongal/StyleGAN-nada' target='_blank'>Code</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=rinong_sgnada' alt='visitor badge'></center>"
405
  gr.Markdown(article)
406
 
407
- blocks.launch(enable_queue=True)
408
 
409
 
410
 
 
 
 
 
 
 
 
 
 
 
411
 
412
  #gradio_interface = gr.Interface(
413
  # fn=editor.edit_image,
 
404
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2108.00946' target='_blank'>StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators</a> | <a href='https://stylegan-nada.github.io/' target='_blank'>Project Page</a> | <a href='https://github.com/rinongal/StyleGAN-nada' target='_blank'>Code</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=rinong_sgnada' alt='visitor badge'></center>"
405
  gr.Markdown(article)
406
 
407
+ #blocks.launch(enable_queue=True)
408
 
409
 
410
 
411
+ def my_inference_function(image,text):
412
+ return editor.predict(image,[text])
413
+
414
+ gradio_interface = gradio.Interface(
415
+ fn = my_inference_function,
416
+ inputs = ["image","text"],
417
+ outputs = "text"
418
+ )
419
+ gradio_interface.launch()
420
+
421
 
422
  #gradio_interface = gr.Interface(
423
  # fn=editor.edit_image,