Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 16, 2024
1 parent 439174a commit 40a0605
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions comps/lvms/video-llama/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ def stream_res(video, instruction, max_new_tokens):
for text in streamer:
yield text


def is_local_file(url):
"""
Returns True if url is a local file, False otherwise
"""
return not url.startswith('http://') and not url.startswith('https://')
"""Returns True if url is a local file, False otherwise."""
return not url.startswith("http://") and not url.startswith("https://")


@app.get("/health")
async def health() -> Response:
Expand All @@ -180,7 +180,7 @@ async def generate(
video_name = os.path.basename(parsed_url.path)
else:
video_name = os.path.basename(video_url)

if video_name.lower().endswith(".mp4"):
logging.info(f"Format check passed, the file '{video_name}' is an MP4 file.")
else:
Expand Down

0 comments on commit 40a0605

Please sign in to comment.