osanseviero HF staff commited on
Commit
5a15dbc
β€’
1 Parent(s): c84c7ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def compute_text_embeddings(list_of_strings):
18
 
19
  def predict(query):
20
  corpus = 'Unsplash'
21
- n_results=1
22
 
23
  text_embeddings = compute_text_embeddings([query]).detach().numpy()
24
  k = 0 if corpus == 'Unsplash' else 1
@@ -31,7 +31,7 @@ title = "Draw to Search"
31
  iface = gr.Interface(
32
  fn=predict,
33
  inputs=[gr.inputs.Textbox(label="text", lines=3)],
34
- outputs='text',
35
  title=title,
36
  examples=[["Sunset"]]
37
  )
 
18
 
19
  def predict(query):
20
  corpus = 'Unsplash'
21
+ n_results=3
22
 
23
  text_embeddings = compute_text_embeddings([query]).detach().numpy()
24
  k = 0 if corpus == 'Unsplash' else 1
 
31
  iface = gr.Interface(
32
  fn=predict,
33
  inputs=[gr.inputs.Textbox(label="text", lines=3)],
34
+ outputs=[gr.output.Image(type="file"), gr.output.Image(type="file"), gr.output.Image(type="file")]
35
  title=title,
36
  examples=[["Sunset"]]
37
  )