Vaishnav14220 commited on
Commit
82f908c
·
1 Parent(s): 7a2f5d4

Fix Dropdown placeholder error - remove invalid placeholder argument

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -125,25 +125,25 @@ with gr.Blocks(title="Organic Reactions Search") as demo:
125
  gr.Markdown("Search through the organic reactions dataset by name, reactant, or product.")
126
 
127
  with gr.Tab("Search by Reaction Name"):
128
- reaction_input = gr.Dropdown(label="Reaction Name", choices=reaction_names, allow_custom_value=True, placeholder="Type or select a reaction name")
129
  reaction_output = gr.Markdown(label="Result")
130
  reaction_btn = gr.Button("Search")
131
  reaction_btn.click(search_by_reaction_name, inputs=reaction_input, outputs=reaction_output)
132
 
133
  with gr.Tab("Search by Reactant"):
134
- reactant_input = gr.Dropdown(label="Reactant", choices=unique_reactants, allow_custom_value=True, placeholder="Type or select a reactant")
135
  reactant_output = gr.Markdown(label="Results")
136
  reactant_btn = gr.Button("Search")
137
  reactant_btn.click(search_by_reactant, inputs=reactant_input, outputs=reactant_output)
138
 
139
  with gr.Tab("View Reaction SVG"):
140
- svg_input = gr.Dropdown(label="Reaction Name", choices=reaction_names, allow_custom_value=True, placeholder="Type or select a reaction name")
141
  svg_output = gr.HTML(label="Reaction SVG")
142
  svg_btn = gr.Button("Generate SVG")
143
  svg_btn.click(generate_reaction_svg, inputs=svg_input, outputs=svg_output)
144
 
145
  with gr.Tab("Search by Product"):
146
- product_input = gr.Dropdown(label="Product", choices=unique_products, allow_custom_value=True, placeholder="Type or select a product")
147
  product_output = gr.Markdown(label="Results")
148
  product_btn = gr.Button("Search")
149
  product_btn.click(search_by_product, inputs=product_input, outputs=product_output)
 
125
  gr.Markdown("Search through the organic reactions dataset by name, reactant, or product.")
126
 
127
  with gr.Tab("Search by Reaction Name"):
128
+ reaction_input = gr.Dropdown(label="Reaction Name", choices=reaction_names, allow_custom_value=True)
129
  reaction_output = gr.Markdown(label="Result")
130
  reaction_btn = gr.Button("Search")
131
  reaction_btn.click(search_by_reaction_name, inputs=reaction_input, outputs=reaction_output)
132
 
133
  with gr.Tab("Search by Reactant"):
134
+ reactant_input = gr.Dropdown(label="Reactant", choices=unique_reactants, allow_custom_value=True)
135
  reactant_output = gr.Markdown(label="Results")
136
  reactant_btn = gr.Button("Search")
137
  reactant_btn.click(search_by_reactant, inputs=reactant_input, outputs=reactant_output)
138
 
139
  with gr.Tab("View Reaction SVG"):
140
+ svg_input = gr.Dropdown(label="Reaction Name", choices=reaction_names, allow_custom_value=True)
141
  svg_output = gr.HTML(label="Reaction SVG")
142
  svg_btn = gr.Button("Generate SVG")
143
  svg_btn.click(generate_reaction_svg, inputs=svg_input, outputs=svg_output)
144
 
145
  with gr.Tab("Search by Product"):
146
+ product_input = gr.Dropdown(label="Product", choices=unique_products, allow_custom_value=True)
147
  product_output = gr.Markdown(label="Results")
148
  product_btn = gr.Button("Search")
149
  product_btn.click(search_by_product, inputs=product_input, outputs=product_output)