jordyvl commited on
Commit
736325e
1 Parent(s): 3afc594

To main, first functional

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -91,9 +91,9 @@ def get_answer_page(response):
91
  # Implement logic to retrieve the page number or an image of the page with the answer.
92
  # best image
93
  best_match = response.source_nodes[0].metadata["file_path"]
94
- answer_page = float(int(best_match[-8:-4]))
95
  image = Image.open(best_match.replace("txt", "png"))
96
- return image, answer_page
97
 
98
 
99
  # Create the gr.Interface function
 
91
  # Implement logic to retrieve the page number or an image of the page with the answer.
92
  # best image
93
  best_match = response.source_nodes[0].metadata["file_path"]
94
+ answer_page = int(best_match[-8:-4])
95
  image = Image.open(best_match.replace("txt", "png"))
96
+ return image, f"Navigate to page {answer_page}"
97
 
98
 
99
  # Create the gr.Interface function