Spaces:
Runtime error
Runtime error
Update app.py
Browse files32 unmodified lines333435363637383945 unmodified lines858687888889909112 unmodified lines10410510610710710810911032 unmodified lines textposition="bottom center", name=word))
fig.update_layout(title="Word Vectors Visualization", fig.update_layout(title="Visualization of Word Vectors", xaxis_title="PCA 1", yaxis_title="PCA 2", showlegend=True,45 unmodified lineswith gr.Blocks() as iface: with gr.Row(): with gr.Column(): gr.Markdown("# Word Analogy and Vector Visualization with Plotly") gr.Markdown("# Word Analogy and Vector Visualization") gr.Markdown( "Select a predefined triplet of words or choose 'Custom' and enter your own (comma-separated) to find a fourth word by analogy, and see their vectors plotted with Plotly.")
12 unmodified lines word_plot = gr.Plot(label="Word Vectors Visualization")
with gr.Row(): word_vectorization = gr.Textbox(label="Word Vectorization for Output Word", lines=4, max_lines=4) word_vectorization = gr.Textbox(label="Vectorization of the Output Word", lines=4, max_lines=4)
clear_btn.click(fn=clear_inputs, inputs=None, outputs=[radio, custom_words, output_word, word_vectorization, word_plot])app.py+3-3