Skip to content

Commit

Permalink
Remove models search
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf committed Dec 9, 2024
1 parent e6c370c commit 24aae1d
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions tabs/download/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,6 @@ def save_drop_model(dropbox):
return None


def search_models(name):
url = f"https://cjtfqzjfdimgpvpwhzlv.supabase.co/rest/v1/models?name=ilike.%25{name}%25&order=created_at.desc&limit=15"
headers = {
"apikey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNqdGZxempmZGltZ3B2cHdoemx2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjY5MjYxMzQsImV4cCI6MjA0MjUwMjEzNH0.OyDXlhvH6D-IsHiWhPAGUtsPGGUvWQynfxUeQwfYToE"
}
response = requests.get(url, headers=headers)
data = response.json()
if len(data) == 0:
gr.Info(i18n("We couldn't find models by that name."))
return None
else:
df = pd.DataFrame(data)[["name", "link", "epochs", "type"]]
df["link"] = df["link"].apply(
lambda x: f'<a href="{x}" target="_blank">{x}</a>'
)
return df


json_url = "https://huggingface.co/IAHispano/Applio/raw/main/pretrains.json"


Expand Down Expand Up @@ -222,20 +204,6 @@ def download_tab():
inputs=[dropbox],
outputs=[dropbox],
)
gr.Markdown(value=i18n("## Search Model"))
search_name = gr.Textbox(
label=i18n("Model Name"),
placeholder=i18n("Introduce the model name to search."),
interactive=True,
)
search_table = gr.Dataframe(datatype="markdown")
search = gr.Button(i18n("Search"))
search.click(
fn=search_models,
inputs=[search_name],
outputs=[search_table],
)
search_name.submit(search_models, [search_name], search_table)
gr.Markdown(value=i18n("## Download Pretrained Models"))
pretrained_model = gr.Dropdown(
label=i18n("Pretrained"),
Expand Down

0 comments on commit 24aae1d

Please sign in to comment.