Sergidev commited on
Commit
5cd07f9
·
verified ·
1 Parent(s): 1c026a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def reduce_to_3d(embedding):
30
 
31
  @spaces.GPU
32
  def compare_embeddings(text_input):
33
- texts = text_input.split('\n')
34
  embeddings = [get_embedding(text) for text in texts]
35
  embeddings_3d = [reduce_to_3d(emb) for emb in embeddings]
36
 
@@ -59,7 +59,8 @@ iface = gr.Interface(
59
  ],
60
  outputs=gr.Plot(),
61
  title="3D Embedding Comparison",
62
- description="Compare the embeddings of multiple strings visualized in 3D space using Mistral 7B."
 
63
  )
64
 
65
  iface.launch()
 
30
 
31
  @spaces.GPU
32
  def compare_embeddings(text_input):
33
+ texts = [t.strip() for t in text_input.split('\n') if t.strip()]
34
  embeddings = [get_embedding(text) for text in texts]
35
  embeddings_3d = [reduce_to_3d(emb) for emb in embeddings]
36
 
 
59
  ],
60
  outputs=gr.Plot(),
61
  title="3D Embedding Comparison",
62
+ description="Compare the embeddings of multiple strings visualized in 3D space using Mistral 7B.",
63
+ allow_flagging="never"
64
  )
65
 
66
  iface.launch()