Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,14 +15,14 @@ def predict(input_text):
|
|
15 |
|
16 |
# Calculate embeddings by calling model.encode(), specifying the device
|
17 |
embeddings = model.encode(input_text, device=device)
|
18 |
-
|
19 |
-
return
|
20 |
|
21 |
# Gradio app interface
|
22 |
gradio_app = gr.Interface(
|
23 |
predict,
|
24 |
inputs="text",
|
25 |
-
outputs="
|
26 |
title="Text to Vector Generator",
|
27 |
description="Input a text and get its vector representation using an embedding model (mixedbread-ai/mxbai-embed-large-v1)."
|
28 |
)
|
|
|
15 |
|
16 |
# Calculate embeddings by calling model.encode(), specifying the device
|
17 |
embeddings = model.encode(input_text, device=device)
|
18 |
+
|
19 |
+
return embeddings
|
20 |
|
21 |
# Gradio app interface
|
22 |
gradio_app = gr.Interface(
|
23 |
predict,
|
24 |
inputs="text",
|
25 |
+
outputs=gr.Textbox(lines=30, placeholder="Scrollable array output")),
|
26 |
title="Text to Vector Generator",
|
27 |
description="Input a text and get its vector representation using an embedding model (mixedbread-ai/mxbai-embed-large-v1)."
|
28 |
)
|