qiqiWav commited on
Commit
0822bdb
·
verified ·
1 Parent(s): 3c7ebe1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import os
2
  import gradio as gr
3
  import pandas as pd
4
- # from gradio_huggingfacehub_search import HuggingfaceHubSearch
5
  import requests
6
 
7
  leaderboard_url = os.getenv("LEADERBOARD_URL", "https://leaderboard.nexa4ai.com")
@@ -132,9 +132,13 @@ with gr.Blocks(theme=theme) as app:
132
 
133
  with gr.TabItem("Submit Model"):
134
  category = gr.Dropdown(choices=["Biology", "Physics", "Business", "Chemistry", "Economics", "Philosophy", "History", "Culture", "Computer Science", "Math", "Health", "Law", "Engineering", "Other"], label="Select Category")
135
- # model_id = HuggingfaceHubSearch(label="Hub Model ID", placeholder="Search for model id on Huggingface", search_type="model")
 
 
 
 
136
  submit_model_button = gr.Button("Submit Model")
137
  submit_model_result = gr.Markdown()
138
- # submit_model_button.click(fn=submit_model, inputs=[category, model_id], outputs=submit_model_result)
139
 
140
  app.launch(share=True)
 
1
  import os
2
  import gradio as gr
3
  import pandas as pd
4
+ from gradio_huggingfacehub_search import HuggingfaceHubSearch
5
  import requests
6
 
7
  leaderboard_url = os.getenv("LEADERBOARD_URL", "https://leaderboard.nexa4ai.com")
 
132
 
133
  with gr.TabItem("Submit Model"):
134
  category = gr.Dropdown(choices=["Biology", "Physics", "Business", "Chemistry", "Economics", "Philosophy", "History", "Culture", "Computer Science", "Math", "Health", "Law", "Engineering", "Other"], label="Select Category")
135
+ model_id = HuggingfaceHubSearch(
136
+ label="Hub Model ID",
137
+ placeholder="Search for model id on Huggingface",
138
+ search_type="model",
139
+ )
140
  submit_model_button = gr.Button("Submit Model")
141
  submit_model_result = gr.Markdown()
142
+ submit_model_button.click(fn=submit_model, inputs=[category, model_id], outputs=submit_model_result)
143
 
144
  app.launch(share=True)