Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Dec 22, 2023
1 parent cf0667f commit 778e713
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions examples/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ def run():

embeddings = Embeddings("http://localhost:8000")

data = [
data = [
"US tops 5 million confirmed virus cases",
"Canada's last fully intact ice shelf has suddenly collapsed, forming a Manhattan-sized iceberg",
"Beijing mobilises invasion craft along coast as Taiwan tensions escalate",
"The National Park Service warns against sacrificing slower friends in a bear attack",
"Maine man wins $1M from $25 lottery ticket",
"Make huge profits without work, earn up to $100,000 a day"
"Make huge profits without work, earn up to $100,000 a day",
]

print("Running similarity queries")
Expand Down Expand Up @@ -74,4 +74,5 @@ def run():
print()
print(f"Total Count: {count}")


run()
3 changes: 2 additions & 1 deletion examples/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run():
"Final: Braves lose to the Phillies in the series opener, 5-0",
"Lightning goaltender pulled, lose to Flyers 4-1",
"Flyers 4 Lightning 1 final",
"Flyers win 4-1"
"Flyers win 4-1",
]

# Run series of questions
Expand All @@ -44,4 +44,5 @@ def run():
for result in extractor.extract([{"name": question, "query": question, "question": question, "snippet": False}], data):
print(f"{result['name']} {result['answer']}")


run()
3 changes: 2 additions & 1 deletion examples/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run():
"With the 30 yard completion, down to the 10 yard line",
"Drains the 3pt shot!!, 0:15 remaining in the game",
"Intercepted! Drives down the court and shoots for the win",
"Massive dunk!!! they are now up by 15 with 2 minutes to go"
"Massive dunk!!! they are now up by 15 with 2 minutes to go",
]

tags = ["Baseball", "Football", "Hockey", "Basketball"]
Expand All @@ -52,4 +52,5 @@ def run():

print(f"{text:<75} {label}")


run()
1 change: 1 addition & 0 deletions examples/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ def run():
print("\n---- Transcribed Text ----")
print(transcription)


run()
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
package_dir={"": "src/python"},
keywords="search embedding machine-learning nlp",
python_requires=">=3.8",
install_requires=[
"aiohttp>=3.8.1"
],
install_requires=["aiohttp>=3.8.1"],
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
Expand Down

0 comments on commit 778e713

Please sign in to comment.