cedpsam commited on
Commit
662609f
·
verified ·
1 Parent(s): 37ee6de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,4 +1,5 @@
1
- from gradio_client import Client
 
2
  import numpy as np
3
  import gradio as gr
4
  def generate_img(prompt):
@@ -18,7 +19,7 @@ def interrogate(img):
18
  client = Client("https://pharmapsychotic-clip-interrogator.hf.space/")
19
  client.view_api()
20
  result = client.predict(
21
- img, # str (filepath or URL to image)
22
  "ViT-L (best for Stable Diffusion 1.*)", # str (Option from: ['ViT-L (best for Stable Diffusion 1.*)'])
23
  "best", # str in 'Mode' Radio component
24
  fn_index=3
 
1
+ import gradio_client
2
+ from gradio_client import Client, file
3
  import numpy as np
4
  import gradio as gr
5
  def generate_img(prompt):
 
19
  client = Client("https://pharmapsychotic-clip-interrogator.hf.space/")
20
  client.view_api()
21
  result = client.predict(
22
+ file(img), # str (filepath or URL to image)
23
  "ViT-L (best for Stable Diffusion 1.*)", # str (Option from: ['ViT-L (best for Stable Diffusion 1.*)'])
24
  "best", # str in 'Mode' Radio component
25
  fn_index=3