import streamlit as st
import os
import json
import pandas as pd
import random
from os.path import join
from datetime import datetime
from src import preprocess_and_load_df, load_agent, ask_agent, decorate_with_code, show_response, get_from_user, load_smart_df, ask_question
from dotenv import load_dotenv
from langchain_groq.chat_models import ChatGroq
from streamlit_feedback import streamlit_feedback
from huggingface_hub import HfApi
st.set_page_config(layout="wide")
sticky_css = """
"""
# Inject the CSS style into the Streamlit app
st.markdown(sticky_css, unsafe_allow_html=True)
load_dotenv()
Groq_Token = os.environ["GROQ_API_KEY"]
hf_token = os.environ["HF_TOKEN"]
models = {"llama3":"llama3-70b-8192","mixtral": "mixtral-8x7b-32768", "llama2": "llama2-70b-4096", "gemma": "gemma-7b-it"}
shape_file = os.getenv("SHAPE_FILE")
self_path = os.path.dirname(os.path.abspath(__file__))
# Using HTML and CSS to center the title
st.write(
"""