Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from langchain_groq.chat_models import ChatGroq
|
|
9 |
|
10 |
load_dotenv("Groq.txt")
|
11 |
Groq_Token = os.environ["GROQ_API_KEY"]
|
12 |
-
models = {"mixtral": "mixtral-8x7b-32768", "
|
13 |
|
14 |
self_path = os.path.dirname(os.path.abspath(__file__))
|
15 |
|
@@ -39,7 +39,7 @@ st.markdown("<h2 class='title'>VayuBuddy</h2>", unsafe_allow_html=True)
|
|
39 |
# inference_server = "https://api-inference.huggingface.co/models/codellama/CodeLlama-13b-hf"
|
40 |
# inference_server = "https://api-inference.huggingface.co/models/pandasai/bamboo-llm"
|
41 |
|
42 |
-
model_name = st.sidebar.selectbox("Select LLM:", ["mixtral", "
|
43 |
|
44 |
questions = ('Custom Prompt',
|
45 |
'Plot the monthly average PM2.5 for the year 2023.',
|
@@ -132,6 +132,7 @@ df["Timestamp"] = pd.to_datetime(df["Timestamp"])
|
|
132 |
query = f"""I have a pandas dataframe data of PM2.5 and PM10.
|
133 |
* Frequency of data is daily.
|
134 |
* `pollution` generally means `PM2.5`.
|
|
|
135 |
* DOn't print, but save result in a variable `answer` and make it global.
|
136 |
* If result is a plot make it in tight layout, save it and save path in `answer`. Example: `answer='plot.png'`
|
137 |
* If result is not a plot, save it as a string in `answer`. Example: `answer='The city is Mumbai'`
|
|
|
9 |
|
10 |
load_dotenv("Groq.txt")
|
11 |
Groq_Token = os.environ["GROQ_API_KEY"]
|
12 |
+
models = {"llama3":"llama3-70b-8192","mixtral": "mixtral-8x7b-32768", "llama2": "llama2-70b-4096", "gemma": "gemma-7b-it"}
|
13 |
|
14 |
self_path = os.path.dirname(os.path.abspath(__file__))
|
15 |
|
|
|
39 |
# inference_server = "https://api-inference.huggingface.co/models/codellama/CodeLlama-13b-hf"
|
40 |
# inference_server = "https://api-inference.huggingface.co/models/pandasai/bamboo-llm"
|
41 |
|
42 |
+
model_name = st.sidebar.selectbox("Select LLM:", ["llama3","mixtral", "llama2", "gemma"])
|
43 |
|
44 |
questions = ('Custom Prompt',
|
45 |
'Plot the monthly average PM2.5 for the year 2023.',
|
|
|
132 |
query = f"""I have a pandas dataframe data of PM2.5 and PM10.
|
133 |
* Frequency of data is daily.
|
134 |
* `pollution` generally means `PM2.5`.
|
135 |
+
* You already have df, so don't read the csv file
|
136 |
* DOn't print, but save result in a variable `answer` and make it global.
|
137 |
* If result is a plot make it in tight layout, save it and save path in `answer`. Example: `answer='plot.png'`
|
138 |
* If result is not a plot, save it as a string in `answer`. Example: `answer='The city is Mumbai'`
|