simonschoe commited on
Commit
2a728c7
β€’
1 Parent(s): 2cc38ad

minor layout adjustments

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -63,29 +63,29 @@ with app:
63
  )
64
  gr.Markdown(
65
  """
66
- #### App usage:
67
  The model is intented to be used for **semantic search**: It encodes the search query (entered in the textbox on the right) in a dense vector space and finds semantic neighbours, i.e., token which frequently occur within similar contexts in the underlying training data.
68
  The model allows for two use cases:
69
  1. *Single Search:* The input query consists of a single word. When provided a bi-, tri-, or even fourgram, the quality of the model output depends on the presence of the query token in the model's vocabulary. N-grams should be concated by an underscore (e.g., "machine_learning" or "artifical_intelligence").
70
  2. *Multi Search:* The input query may consist of several words or n-grams, seperated by comma, semi-colon or newline. It then computes the average vector over all inputs and performs semantic search based on the average input token.
71
 
72
- ##### Examples
73
  - transformation
74
  - climate_change
75
  - risk, political_risk, uncertainty
76
  """
77
  )
78
  with gr.Column():
79
- text_in = gr.Textbox(lines=1, placeholder="Insert search query")
80
  with gr.Row():
81
  n = gr.Slider(value=50, minimum=5, maximum=250, step=5, label="Number of Neighbours")
82
- compute_bt = gr.Button("Compute")
83
  df_out = gr.Dataframe(interactive=False)
84
- f_out = gr.File(interactive=False)
85
  gr.Markdown(
86
  """
87
  <div style='text-align: center;'>Call2Vec by X and Y</center></div>
88
- <img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=simonschoe.call2vec&left_color=green&right_color=red" />'
89
  """
90
  )
91
  compute_bt.click(semantic_search, inputs=[text_in, n], outputs=[df_out, f_out, text_in])
 
63
  )
64
  gr.Markdown(
65
  """
66
+ #### App usage
67
  The model is intented to be used for **semantic search**: It encodes the search query (entered in the textbox on the right) in a dense vector space and finds semantic neighbours, i.e., token which frequently occur within similar contexts in the underlying training data.
68
  The model allows for two use cases:
69
  1. *Single Search:* The input query consists of a single word. When provided a bi-, tri-, or even fourgram, the quality of the model output depends on the presence of the query token in the model's vocabulary. N-grams should be concated by an underscore (e.g., "machine_learning" or "artifical_intelligence").
70
  2. *Multi Search:* The input query may consist of several words or n-grams, seperated by comma, semi-colon or newline. It then computes the average vector over all inputs and performs semantic search based on the average input token.
71
 
72
+ #### Examples
73
  - transformation
74
  - climate_change
75
  - risk, political_risk, uncertainty
76
  """
77
  )
78
  with gr.Column():
79
+ text_in = gr.Textbox(lines=1, placeholder="Insert text", label="Search Query")
80
  with gr.Row():
81
  n = gr.Slider(value=50, minimum=5, maximum=250, step=5, label="Number of Neighbours")
82
+ compute_bt = gr.Button("Start\nSearch")
83
  df_out = gr.Dataframe(interactive=False)
84
+ f_out = gr.File(interactive=False, label="Download")
85
  gr.Markdown(
86
  """
87
  <div style='text-align: center;'>Call2Vec by X and Y</center></div>
88
+ <p class="aligncenter"><img 'id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=simonschoe.call2vec&left_color=green&right_color=blue" /></p>
89
  """
90
  )
91
  compute_bt.click(semantic_search, inputs=[text_in, n], outputs=[df_out, f_out, text_in])