Skip to content

Commit

Permalink
chore(scripts): handle summarization errors
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler committed Nov 26, 2024
1 parent 2b62260 commit d19aca2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/model_gallery_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ def format_description(description):
if readmeFile:
# If there is a README file, read it
readme = fs.read_text(readmeFile)
summarized_readme = summarize(readme)
try:
summarized_readme = summarize(readme)
except Exception as e:
print(f"Error summarizing the README: {str(e)}", file=sys.stderr)
summarized_readme = format_description(summarized_readme)

print("Model correctly processed")
Expand Down

0 comments on commit d19aca2

Please sign in to comment.