bkoz commited on
Commit
3a7b512
·
1 Parent(s): f8d7f09

initial code

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -59,17 +59,18 @@ def respond(query):
59
 
60
  return response.objects[0].properties
61
 
62
- examples = gr.Examples(inputs=["Wine", "Movies", "Sports"])
63
- demo = gr.Interface(fn=respond,
64
- inputs=gr.Textbox(
65
  label="Search the Jeopardy Vector Database powered by Weaviate",
66
  info="Submit a Query:",
67
  lines=1,
68
- value="Guitar",
69
  ),
70
- examples=examples,
71
  outputs="textbox"
72
  )
73
 
 
74
  if __name__ == "__main__":
75
  demo.launch()
 
59
 
60
  return response.objects[0].properties
61
 
62
+ examples = gr.Examples(inputs=["Guitars", "Wine", "Movies", "Sports"])
63
+ demo = gr.Interface(
64
+ gr.Textbox(
65
  label="Search the Jeopardy Vector Database powered by Weaviate",
66
  info="Submit a Query:",
67
  lines=1,
68
+ value=examples[0][0]
69
  ),
70
+ gr.Examples(examples, fn=respond, inputs=inputs),
71
  outputs="textbox"
72
  )
73
 
74
+
75
  if __name__ == "__main__":
76
  demo.launch()