Skip to content

Commit

Permalink
fix the extra line added and remove take prompt from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
HamidShojanazeri committed Aug 27, 2023
1 parent d28fc98 commit 75991d8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions inference/code-llama/code_completion_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ def main(
prompt_file
), f"Provided Prompt file does not exist {prompt_file}"
with open(prompt_file, "r") as f:
user_prompt = "\n".join(f.readlines())
elif not sys.stdin.isatty():
user_prompt = "\n".join(sys.stdin.readlines())
user_prompt = f.read()
else:
print("No user prompt provided. Exiting.")
sys.exit(1)
Expand Down

0 comments on commit 75991d8

Please sign in to comment.