Spaces:
Runtime error
Runtime error
Ari
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ Valid columns: {columns}
|
|
66 |
SQL Query:
|
67 |
"""
|
68 |
sql_prompt = PromptTemplate(template=sql_template, input_variables=['question', 'table_name', 'columns'])
|
69 |
-
llm = OpenAI(temperature=0, openai_api_key=openai_api_key, max_tokens =
|
70 |
sql_generation_chain = LLMChain(llm=llm, prompt=sql_prompt)
|
71 |
|
72 |
# Insights Generation Chain
|
@@ -81,7 +81,7 @@ SQL Query Result:
|
|
81 |
Analysis and Recommendations:
|
82 |
"""
|
83 |
insights_prompt = PromptTemplate(template=insights_template, input_variables=['question', 'result'])
|
84 |
-
insights_chain = LLMChain(llm=llm, prompt=insights_prompt
|
85 |
|
86 |
# General Insights and Recommendations Chain
|
87 |
general_insights_template = """
|
|
|
66 |
SQL Query:
|
67 |
"""
|
68 |
sql_prompt = PromptTemplate(template=sql_template, input_variables=['question', 'table_name', 'columns'])
|
69 |
+
llm = OpenAI(temperature=0, openai_api_key=openai_api_key, max_tokens = 180)
|
70 |
sql_generation_chain = LLMChain(llm=llm, prompt=sql_prompt)
|
71 |
|
72 |
# Insights Generation Chain
|
|
|
81 |
Analysis and Recommendations:
|
82 |
"""
|
83 |
insights_prompt = PromptTemplate(template=insights_template, input_variables=['question', 'result'])
|
84 |
+
insights_chain = LLMChain(llm=llm, prompt=insights_prompt)
|
85 |
|
86 |
# General Insights and Recommendations Chain
|
87 |
general_insights_template = """
|