ravi259 commited on
Commit
a8c4fe6
·
1 Parent(s): d4df7dc
Files changed (3) hide show
  1. PDF_image.png +0 -0
  2. app.py +4 -6
  3. cropped_image.pdf +0 -0
PDF_image.png CHANGED
app.py CHANGED
@@ -299,7 +299,7 @@ def create_dataframe_from_text_2(text):
299
  data_dict = json.loads(text)
300
 
301
  # Extract the 'transactions' data
302
- transactions_data = data_dict.get('transactions', [])
303
 
304
  # Convert the 'transactions' list of dictionaries to a Pandas DataFrame
305
  df = pd.DataFrame(transactions_data)
@@ -359,7 +359,7 @@ ONLY return the JSON.
359
  """
360
 
361
  prompt_template_2 = PromptTemplate.from_template(
362
- prompt_2 + "```{response} {loan_data} ```"
363
  #prompt_2 + "```{loan_data} ```"
364
  )
365
  #prompt_template_2.format(response_1 =response_1, loan_data=result.lower())
@@ -388,10 +388,8 @@ if st.button('Get Loan Transactions', type="primary"):
388
 
389
  #st.write(result.lower())
390
  #response_1 = get_completion(prompt_template_1, "", result)
391
-
392
- #response_2 = OpenAI().complete(prompt_template_2.format(response_1=response_1.text, loan_data=result.lower()))
393
- #response_2 = OpenAI().complete(prompt_template_2.format(response = response.text, loan_data=result.lower()))
394
- response_2 = get_completion(prompt_template_2, response_1.text, result)
395
  #st.write(response_2)
396
  st.table(create_dataframe_from_text_2(response_2.text))
397
 
 
299
  data_dict = json.loads(text)
300
 
301
  # Extract the 'transactions' data
302
+ transactions_data = data_dict.get('Loan Transaction Details', [])
303
 
304
  # Convert the 'transactions' list of dictionaries to a Pandas DataFrame
305
  df = pd.DataFrame(transactions_data)
 
359
  """
360
 
361
  prompt_template_2 = PromptTemplate.from_template(
362
+ prompt_2 + "```{response_1} {loan_data} ```"
363
  #prompt_2 + "```{loan_data} ```"
364
  )
365
  #prompt_template_2.format(response_1 =response_1, loan_data=result.lower())
 
388
 
389
  #st.write(result.lower())
390
  #response_1 = get_completion(prompt_template_1, "", result)
391
+
392
+ response_2 = OpenAI().complete(prompt_template_2.format(response_1=response_1.text, loan_data=result.lower()))
 
 
393
  #st.write(response_2)
394
  st.table(create_dataframe_from_text_2(response_2.text))
395
 
cropped_image.pdf CHANGED
Binary files a/cropped_image.pdf and b/cropped_image.pdf differ