Mitanshu Sukhwani commited on
Commit
a1f0d23
1 Parent(s): 27e7139

fixed multiple lines output cause \n to occur in api use

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -28,11 +28,11 @@ def predict(input_text):
28
  # Gradio app interface
29
  gradio_app = gr.Interface(
30
  predict,
31
- inputs=gr.Textbox(placeholder="Insert Text"),
32
- outputs=gr.Textbox(show_copy_button=True, placeholder='Vector of dimensions 1024'),
33
  title="Text to Vector Generator",
34
- description="Input a text and get its vector representation using an embedding model (mixedbread-ai/mxbai-embed-large-v1)."
35
  )
36
 
37
  if __name__ == "__main__":
38
- gradio_app.launch()
 
28
  # Gradio app interface
29
  gradio_app = gr.Interface(
30
  predict,
31
+ inputs=gr.Textbox(placeholder="Insert Text", label='Text'),
32
+ outputs=gr.Textbox(max_lines=1, placeholder='Vector of dimensions 1024', label='Vector', show_label=True, show_copy_button=True),
33
  title="Text to Vector Generator",
34
+ description="Embedding model: mixedbread-ai/mxbai-embed-large-v1."
35
  )
36
 
37
  if __name__ == "__main__":
38
+ gradio_app.launch()