Tulika2000 commited on
Commit
e8e1300
·
verified ·
1 Parent(s): 75d2294

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -133,19 +133,19 @@ Please answer clearly and provide Python pandas code using DataFrame `df` to rep
133
  return answer
134
 
135
  # ========== Gradio UI ==========
136
- with gr.Blocks(title="CsvPal-AI: Chat with Your CSV (RAG-powered, single Q&A)") as demo:
137
  gr.Markdown(
138
  """
139
- # CsvPal-AI
140
  Upload a CSV file and ask natural language questions.
141
  Receive clear, data-grounded answers and Python pandas code snippets.
142
  """
143
  )
144
  with gr.Row():
145
- csv_file = gr.File(label="Upload CSV", file_types=[".csv"])
146
 
147
  status = gr.Textbox(label="Status", interactive=False, max_lines=3)
148
- df_preview = gr.HTML(label="CSV Preview")
149
 
150
  gr.Markdown(
151
  "⚠️ Note: Answers are based on the top 10 most relevant rows retrieved from your CSV for each question."
@@ -153,14 +153,14 @@ with gr.Blocks(title="CsvPal-AI: Chat with Your CSV (RAG-powered, single Q&A)")
153
  gr.Markdown("----")
154
 
155
  user_input = gr.Textbox(
156
- label="Ask your question:",
157
  placeholder="e.g. What analysis can be done in the CSV data?",
158
  interactive=False,
159
  lines=1
160
  )
161
 
162
  with gr.Row():
163
- ask_btn = gr.Button("Get Answer", interactive=False)
164
  clear_btn = gr.Button("Clear")
165
 
166
  answer_output = gr.Textbox(
 
133
  return answer
134
 
135
  # ========== Gradio UI ==========
136
+ with gr.Blocks(title="CsvPal-AI: Chat with Your CSV (RAG-powered Q&A)") as demo:
137
  gr.Markdown(
138
  """
139
+ # 📊 CsvPal-AI
140
  Upload a CSV file and ask natural language questions.
141
  Receive clear, data-grounded answers and Python pandas code snippets.
142
  """
143
  )
144
  with gr.Row():
145
+ csv_file = gr.File(label="📂 Upload CSV", file_types=[".csv"])
146
 
147
  status = gr.Textbox(label="Status", interactive=False, max_lines=3)
148
+ df_preview = gr.HTML(label="🧾 CSV Preview")
149
 
150
  gr.Markdown(
151
  "⚠️ Note: Answers are based on the top 10 most relevant rows retrieved from your CSV for each question."
 
153
  gr.Markdown("----")
154
 
155
  user_input = gr.Textbox(
156
+ label="📝 Ask your question:",
157
  placeholder="e.g. What analysis can be done in the CSV data?",
158
  interactive=False,
159
  lines=1
160
  )
161
 
162
  with gr.Row():
163
+ ask_btn = gr.Button("🤖 Get Answer", interactive=False)
164
  clear_btn = gr.Button("Clear")
165
 
166
  answer_output = gr.Textbox(