Skip to content

Commit

Permalink
Fix python header comments for some extra gRPC backends
Browse files Browse the repository at this point in the history
When a Python script is to be executed directly via exec(3), either the platform knows how to execute
the file itself (i.e. special configuration is necessary) or the first line
contains a shebang (#!) specifying the interpreter to run it (similar to
shell scripts).

The shebang MUST be on the first line for the script to work on all platforms,
so any header comments need to be in the lines following it. Otherwise
executing these scripts as extra backends will yield an "exec format
error" message.

Changes:
* Move introductory comments below the shebang line
* Change header comment in transformers.py to refer to the correct
  python module

Signed-off-by: Marcus Köhler <khler.marcus@gmail.com>
  • Loading branch information
B4ckslash committed Nov 23, 2023
1 parent c5c77d2 commit fc713e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions backend/python/bark/ttsbark.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env python3
"""
This is the extra gRPC server of LocalAI
"""

#!/usr/bin/env python3
from concurrent import futures
import time
import argparse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""
Extra gRPC server for HuggingFace SentenceTransformer models.
"""
#!/usr/bin/env python3
from concurrent import futures

import argparse
Expand Down
4 changes: 2 additions & 2 deletions backend/python/transformers/transformers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""
Extra gRPC server for HuggingFace SentenceTransformer models.
Extra gRPC server for HuggingFace AutoModel models.
"""
#!/usr/bin/env python3
from concurrent import futures

import argparse
Expand Down

0 comments on commit fc713e6

Please sign in to comment.