Spaces:
Sleeping
Sleeping
Update src/webui.py
Browse files- src/webui.py +18 -18
src/webui.py
CHANGED
@@ -174,24 +174,24 @@ if __name__ == '__main__':
|
|
174 |
)
|
175 |
gr.Markdown("Duplicate the old CPU space for use in private: [](https://huggingface.co/spaces/r3gm/AICoverGen_old_stable_cpu?duplicate=true)\n\n")
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
|
196 |
|
197 |
with gr.Tab("Generate"):
|
|
|
174 |
)
|
175 |
gr.Markdown("Duplicate the old CPU space for use in private: [](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"):
|