ALLOUNE commited on
Commit
a7372e0
·
1 Parent(s): a4232fc
Files changed (2) hide show
  1. app.py +1 -0
  2. src/services/processor.py +3 -2
app.py CHANGED
@@ -59,6 +59,7 @@ async def process_constraints(constraints: InputConstraints):
59
  @app.post("/prior-art-constraints", response_model=OutputPriorArt)
60
  async def prior_art_constraints(data: InputPriorArtConstraints):
61
  prior_art = process_prior_art(data.technologies, data.constraints, "constraints")
 
62
  return prior_art
63
 
64
  @app.post("/prior-art-problems", response_model=OutputPriorArt)
 
59
  @app.post("/prior-art-constraints", response_model=OutputPriorArt)
60
  async def prior_art_constraints(data: InputPriorArtConstraints):
61
  prior_art = process_prior_art(data.technologies, data.constraints, "constraints")
62
+ print(prior_art)
63
  return prior_art
64
 
65
  @app.post("/prior-art-problems", response_model=OutputPriorArt)
src/services/processor.py CHANGED
@@ -1,4 +1,4 @@
1
- from src.services.utils import tech_to_dict, stem
2
  import requests as r
3
  import json
4
  import nltk
@@ -271,7 +271,8 @@ def add_citations_and_collect_uris(response):
271
  if citation_links:
272
  citation_string = ", ".join(citation_links)
273
  text = text[:end_index] + citation_string + text[end_index:]
 
274
  except Exception as e:
275
  print(f"Error : {e}")
 
276
 
277
- return {"content": text,"uris": list(uris_added)}
 
1
+ from src.services.utils import tech_to_dict, stem, set_gemini
2
  import requests as r
3
  import json
4
  import nltk
 
271
  if citation_links:
272
  citation_string = ", ".join(citation_links)
273
  text = text[:end_index] + citation_string + text[end_index:]
274
+ return {"content": text,"uris": list(uris_added)}
275
  except Exception as e:
276
  print(f"Error : {e}")
277
+ return {"content": e, "uris": []}
278