Spaces:
Sleeping
Sleeping
Commit ·
068ec50
1
Parent(s): 6950b4d
add OpenModelLab demo
Browse files- app.py +30 -0
- requirements.txt +1 -0
app.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def analyze(model_name):
|
| 4 |
+
return f"""
|
| 5 |
+
OpenModelLab Demo
|
| 6 |
+
|
| 7 |
+
Model:
|
| 8 |
+
{model_name}
|
| 9 |
+
|
| 10 |
+
Available soon:
|
| 11 |
+
- Model Genome extraction
|
| 12 |
+
- Architecture analysis
|
| 13 |
+
- Benchmark profiling
|
| 14 |
+
- Runtime comparison
|
| 15 |
+
|
| 16 |
+
Research:
|
| 17 |
+
https://doi.org/10.5281/zenodo.21763818
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
demo = gr.Interface(
|
| 21 |
+
fn=analyze,
|
| 22 |
+
inputs=gr.Textbox(
|
| 23 |
+
label="Hugging Face Model",
|
| 24 |
+
value="sentence-transformers/all-MiniLM-L6-v2"
|
| 25 |
+
),
|
| 26 |
+
outputs="text",
|
| 27 |
+
title="OpenModelLab"
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio
|