Spaces:
Sleeping
Sleeping
Commit
·
b741b60
1
Parent(s):
3d4c7bf
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,6 @@ from annoy import AnnoyIndex
|
|
8 |
cohere_api_key = "4GMQpN0nV9chIaV3DTQNmVYiskbTZdDBPrvw7pPs"
|
9 |
co = cohere.Client(cohere_api_key)
|
10 |
|
11 |
-
|
12 |
-
|
13 |
# Define a function to search for information
|
14 |
def search_text(query):
|
15 |
query_embed = co.embed(texts=[query]).embeddings
|
@@ -53,7 +51,7 @@ texts = np.array([t.strip(' \n') for t in texts if t])
|
|
53 |
# Create Gradio interface
|
54 |
iface = gr.Interface(
|
55 |
fn=ask_llm,
|
56 |
-
inputs=gr.inputs.Textbox(
|
57 |
outputs="text",
|
58 |
title="Sydney Beaches Information",
|
59 |
live=True,
|
@@ -61,4 +59,4 @@ iface = gr.Interface(
|
|
61 |
)
|
62 |
|
63 |
# Launch the Gradio interface
|
64 |
-
iface.launch(share=True)
|
|
|
8 |
cohere_api_key = "4GMQpN0nV9chIaV3DTQNmVYiskbTZdDBPrvw7pPs"
|
9 |
co = cohere.Client(cohere_api_key)
|
10 |
|
|
|
|
|
11 |
# Define a function to search for information
|
12 |
def search_text(query):
|
13 |
query_embed = co.embed(texts=[query]).embeddings
|
|
|
51 |
# Create Gradio interface
|
52 |
iface = gr.Interface(
|
53 |
fn=ask_llm,
|
54 |
+
inputs=gr.inputs.Textbox(label="Ask a question about Sydney beaches:"),
|
55 |
outputs="text",
|
56 |
title="Sydney Beaches Information",
|
57 |
live=True,
|
|
|
59 |
)
|
60 |
|
61 |
# Launch the Gradio interface
|
62 |
+
iface.launch(share=True)
|