Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from langchain.agents.agent_types import AgentType
|
|
9 |
from langchain_experimental.agents.agent_toolkits import create_csv_agent
|
10 |
|
11 |
import os
|
12 |
-
API_KEY=os.getenv
|
13 |
|
14 |
# API keys-----------------move them to ENV
|
15 |
os.environ["OPENAI_API_KEY"] = "NA"
|
@@ -211,9 +211,21 @@ interface = gr.Interface(
|
|
211 |
gr.Textbox(label="Expected Output")
|
212 |
],
|
213 |
outputs="text",
|
214 |
-
title="
|
215 |
-
description=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
)
|
217 |
|
218 |
# Launch the Gradio interface
|
219 |
-
interface.launch()
|
|
|
9 |
from langchain_experimental.agents.agent_toolkits import create_csv_agent
|
10 |
|
11 |
import os
|
12 |
+
API_KEY=os.getenv("GOOGLE_API_KEY")
|
13 |
|
14 |
# API keys-----------------move them to ENV
|
15 |
os.environ["OPENAI_API_KEY"] = "NA"
|
|
|
211 |
gr.Textbox(label="Expected Output")
|
212 |
],
|
213 |
outputs="text",
|
214 |
+
title="DataWizardZ",
|
215 |
+
description=(
|
216 |
+
"Upload a file (CSV, PDF, DOCX, TXT, JSON) and enter your query to get detailed information.\n\n"
|
217 |
+
"### Instructions:\n"
|
218 |
+
"1. Upload the file you want to talk to.\n"
|
219 |
+
"2. Enter your question in the Query field.\n"
|
220 |
+
"3. Specify the desired output format, e.g., one line answer.\n"
|
221 |
+
"4. Please be patient; it can take up to 300ms for effective results, especially for large files or one-word answers.\n"
|
222 |
+
"5. Please note that DO NOT specify Expected Output for .CSV Files."
|
223 |
+
),
|
224 |
+
examples=[
|
225 |
+
["LabManual_cnn.pdf", "How to setup wired LAN", "A short summary"],
|
226 |
+
["house_prices.csv", "What is the average price of houses in Thane"]
|
227 |
+
]
|
228 |
)
|
229 |
|
230 |
# Launch the Gradio interface
|
231 |
+
interface.launch()
|