From a94be9fc2f8b4698ef207c7e1a14c0d1f9a0f778 Mon Sep 17 00:00:00 2001 From: Li Bo Date: Tue, 7 Nov 2023 08:22:39 +0000 Subject: [PATCH] Update model ID and file paths in otterhd_endpoint.py --- pipeline/serve/deploy/otterhd_endpoint.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipeline/serve/deploy/otterhd_endpoint.py b/pipeline/serve/deploy/otterhd_endpoint.py index 523968b3..65187d23 100644 --- a/pipeline/serve/deploy/otterhd_endpoint.py +++ b/pipeline/serve/deploy/otterhd_endpoint.py @@ -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 @@ -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 @@ -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")