Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,13 @@ from collections import defaultdict
|
|
| 9 |
from networkx.drawing.nx_pydot import graphviz_layout
|
| 10 |
from io import BytesIO
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
def get_model_names_from_yaml(url):
|
| 14 |
"""Get a list of parent model names from the yaml file."""
|
|
@@ -165,7 +172,7 @@ def create_family_tree(start_model):
|
|
| 165 |
return img_buffer.getvalue()
|
| 166 |
|
| 167 |
with gr.Blocks() as demo:
|
| 168 |
-
gr.Markdown(
|
| 169 |
model_id = gr.Textbox(label="Model ID", value="mlabonne/NeuralBeagle-7B")
|
| 170 |
btn = gr.Button("Create tree")
|
| 171 |
out = gr.Image()
|
|
|
|
| 9 |
from networkx.drawing.nx_pydot import graphviz_layout
|
| 10 |
from io import BytesIO
|
| 11 |
|
| 12 |
+
TITLE = """
|
| 13 |
+
<div align="center">
|
| 14 |
+
<p style="font-size: 36px;">🌳 Merge Family Tree</p>
|
| 15 |
+
</div><br/>
|
| 16 |
+
<p>Automatically calculate the family tree of a given model. It also displays the type of license each model uses (permissive, noncommercial, or unknown).</p>
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
|
| 20 |
def get_model_names_from_yaml(url):
|
| 21 |
"""Get a list of parent model names from the yaml file."""
|
|
|
|
| 172 |
return img_buffer.getvalue()
|
| 173 |
|
| 174 |
with gr.Blocks() as demo:
|
| 175 |
+
gr.Markdown(TITLE)
|
| 176 |
model_id = gr.Textbox(label="Model ID", value="mlabonne/NeuralBeagle-7B")
|
| 177 |
btn = gr.Button("Create tree")
|
| 178 |
out = gr.Image()
|