SpyCoder77 commited on
Commit
fdc49f6
·
verified ·
1 Parent(s): 529e196

Update src/webui.py

Browse files
Files changed (1) hide show
  1. src/webui.py +19 -10
src/webui.py CHANGED
@@ -174,16 +174,25 @@ if __name__ == '__main__':
174
  )
175
  gr.Markdown("Duplicate the old CPU space for use in private: [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm-dark.svg)](https://huggingface.co/spaces/r3gm/AICoverGen_old_stable_cpu?duplicate=true)\n\n")
176
 
177
- with gr.Tab("Find Models"):
178
- model_query = gr.Textbox(placeholder="Eg: Taylor Swift, Drake", max_lines=1, lines=1)
179
- model_display = gr.Dataframe(
180
- headers=["name", "author", "url"],
181
- datatype=["str", "str", "str"],
182
- row_count=5,
183
- col_count=(3, "fixed"),
184
- )
185
- filter_btn = gr.Button("Search")
186
- filter_btn.click(lambda query: filter_models([], query), inputs=model_query, outputs=model_display)
 
 
 
 
 
 
 
 
 
187
 
188
  with gr.Tab("Generate"):
189
 
 
174
  )
175
  gr.Markdown("Duplicate the old CPU space for use in private: [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm-dark.svg)](https://huggingface.co/spaces/r3gm/AICoverGen_old_stable_cpu?duplicate=true)\n\n")
176
 
177
+ with gr.Tab("Find Models"):
178
+ # Input field for model query
179
+ model_query = gr.Textbox(placeholder="Eg: Taylor Swift, Drake", max_lines=1, lines=1, label="Search Models")
180
+
181
+ # Dataframe to display the filtered models
182
+ model_display = gr.Dataframe(
183
+ headers=["name", "author", "url"],
184
+ datatype=["str", "str", "str"],
185
+ row_count=5,
186
+ col_count=(3, "fixed"),
187
+ label="Model Results"
188
+ )
189
+
190
+ # Button to trigger the search
191
+ filter_btn = gr.Button("Search")
192
+
193
+ # Connect the button click to the filter_models function
194
+ filter_btn.click(fn=lambda query: filter_models([], query), inputs=model_query, outputs=model_display)
195
+
196
 
197
  with gr.Tab("Generate"):
198