Pijush2023 commited on
Commit
d00cf20
·
verified ·
1 Parent(s): 2f01852

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -1971,15 +1971,15 @@ Sure! The Responses are as follows:
1971
  #phi-dataframe creation
1972
 
1973
  # Extract information using regex (assuming response format as given above)
1974
- doc_names = re.findall(r'Document name: (.+)', phi_response)
1975
- page_numbers = re.findall(r'Page No: (\d+)', phi_response)
1976
- responses = re.findall(r'Response: (.+)', phi_response)
1977
 
1978
- # Create a DataFrame with the extracted information
1979
- data = {'Document Name': doc_names[:3], 'Page Number': page_numbers[:3], 'Top 3 Responses': responses[:3]}
1980
- df = pd.DataFrame(data)
1981
 
1982
- return df
1983
 
1984
  # Function to display the table based on the Phi-3.5 response
1985
  def display_phi_table(input_prompt):
 
1971
  #phi-dataframe creation
1972
 
1973
  # Extract information using regex (assuming response format as given above)
1974
+ doc_names = re.findall(r'Document name: (.+)', phi_response)
1975
+ page_numbers = re.findall(r'Page No: (\d+)', phi_response)
1976
+ responses = re.findall(r'Response: (.+)', phi_response)
1977
 
1978
+ # Create a DataFrame with the extracted information
1979
+ data = {'Document Name': doc_names[:3], 'Page Number': page_numbers[:3], 'Top 3 Responses': responses[:3]}
1980
+ df = pd.DataFrame(data)
1981
 
1982
+ return df
1983
 
1984
  # Function to display the table based on the Phi-3.5 response
1985
  def display_phi_table(input_prompt):