hmacdope's picture
initial app demo
6024b7c
raw
history blame
2.06 kB
import gradio as gr
from gradio_leaderboard import Leaderboard, ColumnFilter
import pandas as pd
# dataset = load_dataset("your_dataset_name")
from datetime import datetime
def gradio_interface():
with gr.Blocks(title="OpenADMET ADMET Challenge") as demo:
# --- Welcome markdown message ---
welcome_md = """
# πŸ§ͺ OpenADMET + XXX
## Computational Blind Challenge in ADMET
Welcome to the **XXX**, hosted by **OpenADMET** in collaboration with **XXX**.
Your task is to develop and submit predictive models for key ADMET properties on a blinded test set of real world drug discovery data.
πŸ“… **Timeline**:
- TBD
---
"""
# --- Gradio Interface ---
with gr.Tabs(elem_classes="tab-buttons"):
with gr.TabItem("Welcome"):
gr.Markdown(welcome_md)
with gr.TabItem("Submit Predictions"):
gr.Markdown("Upload your prediction files here.")
filename = gr.State(value=None)
eval_state = gr.State(value=None)
user_state = gr.State(value=None)
with gr.TabItem("Leaderboard"):
gr.Markdown("View the leaderboard here.")
df = pd.DataFrame({
"user": ["User1", "User2", "User3"],
"Model": ["A", "B", "C"],
"R2": [0.94, 0.92, 0.89],
"Spearman R": [0.93, 0.91, 0.88],
})
Leaderboard(
value=df,
# Optionally configure columns:
select_columns=["Model", "R2", "Spearman R"],
# Additional options: search_columns, filter_columns, hide_columns, etc.
search_columns=["Model", "user"],
)
with gr.TabItem("About"):
gr.Markdown("Learn more about the challenge and the organizers.")
return demo
if __name__ == "__main__":
gradio_interface().launch()