YchKhan commited on
Commit
1936f0e
·
verified ·
1 Parent(s): 4ccb9e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -197,6 +197,7 @@ def analyze_pdf_novelty(patent_background, url, data_type="pdf"):
197
  break
198
 
199
  text = text[:6000] # Limit to 6000 characters
 
200
  except Exception as e:
201
  return {"error": f"Error processing PDF: {str(e)}"}
202
 
@@ -239,6 +240,7 @@ def analyze_pdf_novelty(patent_background, url, data_type="pdf"):
239
  user_message=f"Patent background:\n{patent_background}\n\nDocument content:\n{text}",
240
  system_prompt=infringement_prompt
241
  )
 
242
 
243
  # # Extract insights
244
  # insights = ask_ollama(
 
197
  break
198
 
199
  text = text[:6000] # Limit to 6000 characters
200
+ print(f"Extracted content from pdf: {text[:50]}")
201
  except Exception as e:
202
  return {"error": f"Error processing PDF: {str(e)}"}
203
 
 
240
  user_message=f"Patent background:\n{patent_background}\n\nDocument content:\n{text}",
241
  system_prompt=infringement_prompt
242
  )
243
+ print(f"Analysis result = {result}")
244
 
245
  # # Extract insights
246
  # insights = ask_ollama(