Spaces:
Runtime error
Runtime error
better ui
Browse files69 unmodified lines707172737475763 unmodified lines8081828384858687888969 unmodified linesreturn html, str(json_path)with gr.Blocks(css="body{background:#fafafa;}") as demo:gr.Markdown("## 🔍 Modular‑candidate explorer for 🤗 Transformers")with gr.Row():3 unmodified linessim_radio = gr.Radio(["jaccard", "embedding"], value="jaccard", label="Similarity metric")go_btn = gr.Button("Build graph")html_out = gr.HTML()json_out = gr.File(label="Download graph.json")go_btn.click(run, [repo_in, thresh, multi_cb, sim_radio], [html_out, json_out])if __name__ == "__main__":demo.launch()69 unmodified lines7071727374757677787980813 unmodified lines8586878889909192939469 unmodified linesreturn html, str(json_path)CUSTOM_CSS = """#graph_html iframe {height:85vh !important; width:100% !important; border:none;}"""with gr.Blocks(css=CUSTOM_CSS) as demo:gr.Markdown("## 🔍 Modular‑candidate explorer for 🤗 Transformers")with gr.Row():3 unmodified linessim_radio = gr.Radio(["jaccard", "embedding"], value="jaccard", label="Similarity metric")go_btn = gr.Button("Build graph")html_out = gr.HTML(elem_id="graph_html", sanitize=False, show_label=False)json_out = gr.File(label="Download graph.json")go_btn.click(run, [repo_in, thresh, multi_cb, sim_radio], [html_out, json_out])if __name__ == "__main__":demo.launch()
app.py+8-3