Upload 6 files
Browse filesnew code manual table loaded
Files changed (3)
- app.py+2-4
- custom_table.pyAdded
- database.py+4-2
5 unmodified lines6789910111262 unmodified lines7576777879808116 unmodified lines98991001001011025 unmodified linesimport sqlite3import google.generativeai as genaiimport pandas as pdfrom database import dffrom custom_table import get_dataframefrom utils import remove_triple_quotes
# configure genai key62 unmodified lines
# Display DataFrame in Streamlitdf = get_dataframe()st.write('##### This is the sample table...')st.write(df.head(5))
16 unmodified lines # st.write(row)
123456678991011121314import pandas as pdimport sqlite3from custom_table import get_dataframe
# Specify the path to your Excel file# excel_file_path = 'C:\\Users\\rakes\\sql\\table_data.xlsx'excel_file_path = "https://huggingface.co/spaces/rakeshkumar1812/text-to-SQL-GenAI-App/tree/main/table_data.xlsx"# excel_file_path = "https://huggingface.co/spaces/rakeshkumar1812/text-to-SQL-GenAI-App/tree/main/table_data.xlsx"
# Read the Excel file into a pandas DataFramedf = pd.read_excel(excel_file_path, sheet_name='Customer_Data')# df = pd.read_excel(excel_file_path, sheet_name='Customer_Data')df = get_dataframe()
# Display the DataFrame# print(df.shape)app.py+2-4
custom_table.pyAdded
database.py+4-2