Mikeplockhart commited on
Commit
afc3612
1 Parent(s): bf0561a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -15
app.py CHANGED
@@ -60,20 +60,17 @@ def run_query(query_string: str, collection):
60
  meal_string = search_chroma(collection, query_string)
61
  return meal_string
62
 
63
- if __name__ == "__main__":
64
- collection = utils.chroma_client_setup()
65
- setup(collection)
66
- with gr.Blocks() as meal_search:
67
- gr.Markdown("Start typing below and then click **Run** to see the output.")
68
- with gr.Row():
69
- inp = gr.Textbox(placeholder="What sort of meal are you after?")
70
- out = gr.Textbox()
71
- btn = gr.Button("Run")
72
- btn.click(
73
- fn=run_query,
74
- inputs=inp,
75
- outputs=out
76
- )
77
 
78
- meal_search.launch()
79
 
 
60
  meal_string = search_chroma(collection, query_string)
61
  return meal_string
62
 
63
+ with gr.Blocks() as meal_search:
64
+ gr.Markdown("Start typing below and then click **Run** to see the output.")
65
+ with gr.Row():
66
+ inp = gr.Textbox(placeholder="What sort of meal are you after?")
67
+ out = gr.Textbox()
68
+ btn = gr.Button("Run")
69
+ btn.click(
70
+ fn=run_query,
71
+ inputs=inp,
72
+ outputs=out
73
+ )
 
 
 
74
 
75
+ meal_search.launch()
76