mobrown commited on
Commit
7702cd1
1 Parent(s): c58f499

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -33,7 +33,7 @@ def plot_words_plotly(model, words):
33
  textposition="bottom center",
34
  name=word))
35
 
36
- fig.update_layout(title="Word Vectors Visualization",
37
  xaxis_title="PCA 1",
38
  yaxis_title="PCA 2",
39
  showlegend=True,
@@ -85,7 +85,7 @@ def clear_inputs():
85
  with gr.Blocks() as iface:
86
  with gr.Row():
87
  with gr.Column():
88
- gr.Markdown("# Word Analogy and Vector Visualization with Plotly")
89
  gr.Markdown(
90
  "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.")
91
 
@@ -104,7 +104,7 @@ with gr.Blocks() as iface:
104
  word_plot = gr.Plot(label="Word Vectors Visualization")
105
 
106
  with gr.Row():
107
- word_vectorization = gr.Textbox(label="Word Vectorization for Output Word", lines=4, max_lines=4)
108
 
109
  clear_btn.click(fn=clear_inputs, inputs=None,
110
  outputs=[radio, custom_words, output_word, word_vectorization, word_plot])
 
33
  textposition="bottom center",
34
  name=word))
35
 
36
+ fig.update_layout(title="Visualization of Word Vectors",
37
  xaxis_title="PCA 1",
38
  yaxis_title="PCA 2",
39
  showlegend=True,
 
85
  with gr.Blocks() as iface:
86
  with gr.Row():
87
  with gr.Column():
88
+ gr.Markdown("# Word Analogy and Vector Visualization")
89
  gr.Markdown(
90
  "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.")
91
 
 
104
  word_plot = gr.Plot(label="Word Vectors Visualization")
105
 
106
  with gr.Row():
107
+ word_vectorization = gr.Textbox(label="Vectorization of the Output Word", lines=4, max_lines=4)
108
 
109
  clear_btn.click(fn=clear_inputs, inputs=None,
110
  outputs=[radio, custom_words, output_word, word_vectorization, word_plot])