ravi259 commited on
Commit
6ec2170
Β·
1 Parent(s): a796d91
Files changed (2) hide show
  1. app.py +7 -7
  2. requirements.txt +1 -2
app.py CHANGED
@@ -317,7 +317,7 @@ Return a table of ALL transactions in a pandas data frame object
317
 
318
  from text in triple tick marks.
319
 
320
- Just return the pandas data frame with name 'data' """
321
 
322
  prompt_template_2 = PromptTemplate.from_template(
323
  #prompt_2 + "```{response_1} {loan_data} ```"
@@ -328,8 +328,6 @@ prompt_template_2 = PromptTemplate.from_template(
328
  progress_text = "Operation in progress. Please wait."
329
  my_bar = st.progress(0, text=progress_text)
330
 
331
-
332
-
333
  if st.button('Get Loan Details',type="primary"):
334
  with st.spinner("πŸ€– AI is at Work! "):
335
  result = read_file_get_prompts(file_name)
@@ -338,25 +336,27 @@ if st.button('Get Loan Details',type="primary"):
338
  time.sleep(0.01)
339
  my_bar.progress(percent_complete + 1, text=progress_text)
340
  time.sleep(1)
341
- my_bar.empty()
342
 
343
  response_1 = OpenAI().complete(prompt_template_1.format(loan_data=result.lower()))
344
  st.write(response_1)
 
345
  st.balloons()
346
 
347
- if st.button('Get Loan Transactions'):
348
  with st.spinner("πŸ€– AI is at Work! "):
349
  result = read_file_get_prompts(file_name)
350
 
351
  for percent_complete in range(100):
352
- time.sleep(0.01)
353
  my_bar.progress(percent_complete + 1, text=progress_text)
354
  time.sleep(1)
355
- my_bar.empty()
356
 
357
  #response_1 = OpenAI().complete(prompt_template_1.format(loan_data=result.lower()))
358
  response_2 = OpenAI().complete(prompt_template_2.format(loan_data=result.lower()))
359
  st.write(response_2)
 
360
  st.balloons()
361
 
362
 
 
317
 
318
  from text in triple tick marks.
319
 
320
+ Just return JSON object with keys Month, EMI Paid, Payment Status, Interest Amount, Principal Amount, Balance Amount"""
321
 
322
  prompt_template_2 = PromptTemplate.from_template(
323
  #prompt_2 + "```{response_1} {loan_data} ```"
 
328
  progress_text = "Operation in progress. Please wait."
329
  my_bar = st.progress(0, text=progress_text)
330
 
 
 
331
  if st.button('Get Loan Details',type="primary"):
332
  with st.spinner("πŸ€– AI is at Work! "):
333
  result = read_file_get_prompts(file_name)
 
336
  time.sleep(0.01)
337
  my_bar.progress(percent_complete + 1, text=progress_text)
338
  time.sleep(1)
339
+
340
 
341
  response_1 = OpenAI().complete(prompt_template_1.format(loan_data=result.lower()))
342
  st.write(response_1)
343
+ my_bar.empty()
344
  st.balloons()
345
 
346
+ if st.button('Get Loan Transactions', type="secondary"):
347
  with st.spinner("πŸ€– AI is at Work! "):
348
  result = read_file_get_prompts(file_name)
349
 
350
  for percent_complete in range(100):
351
+ time.sleep(0.0001)
352
  my_bar.progress(percent_complete + 1, text=progress_text)
353
  time.sleep(1)
354
+
355
 
356
  #response_1 = OpenAI().complete(prompt_template_1.format(loan_data=result.lower()))
357
  response_2 = OpenAI().complete(prompt_template_2.format(loan_data=result.lower()))
358
  st.write(response_2)
359
+ my_bar.empty()
360
  st.balloons()
361
 
362
 
requirements.txt CHANGED
@@ -13,5 +13,4 @@ pdfminer-six
13
  python-dotenv
14
  llama-index
15
  langchain
16
- openai
17
- time
 
13
  python-dotenv
14
  llama-index
15
  langchain
16
+ openai