Skip to content

Commit

Permalink
Update model ID and file paths in
Browse files Browse the repository at this point in the history
otterhd_endpoint.py
  • Loading branch information
Luodian committed Nov 7, 2023
1 parent 21a104b commit a94be9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pipeline/serve/deploy/otterhd_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
app = Flask(__name__)

# Initialization code (similar to what you have in your Gradio demo)
model_id = "/home/luodian/azure_storage/otter/checkpoints/OtterBite_NOV2_MIX_xDynamic_Bench_Continue"
model_id = input("Model ID: ")
device = "cuda:0"
dtype = torch.bfloat16

Expand All @@ -21,8 +21,8 @@
# Ensure model is in evaluation mode
model.eval()

prompt_txt_path = "/home/luodian/projects/Otter/pipeline/serve/user_logs/prompts.txt"
images_folder_path = "/home/luodian/projects/Otter/pipeline/serve/user_logs"
prompt_txt_path = "../user_logs/prompts.txt"
images_folder_path = "../user_logs"


# Define endpoint
Expand Down Expand Up @@ -52,7 +52,7 @@ def process_image_and_prompt():
torch.cuda.empty_cache()

with open(prompt_txt_path, "a") as f:
f.write(formated_time + "\n")
f.write(f"*************************{formated_time}**************************" + "\n")
f.write(prompt + "\n")
f.write(response + "\n\n")

Expand Down

0 comments on commit a94be9f

Please sign in to comment.