Skip to content

Commit 2cbf9b4

Browse files
committed
Update api.py
1 parent b11e33b commit 2cbf9b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/api/api.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1098,9 +1098,11 @@ def invocations(self, req: models.InvocationsRequest):
10981098
response = requests.get('http://0.0.0.0:8080/sam/sam-model')
10991099
print(f'\nsam/sam-model: {response.text}\n')
11001100

1101-
global user_input_data
1102-
if user_input_data['workflow'] in ["style", "image"]:
1103-
print(f"In {user_input_data['workflow']}")
1101+
1102+
if 'user_input_data' in globals():
1103+
global user_input_data
1104+
if user_input_data['workflow'] in ["style", "image"]:
1105+
print(f"In {user_input_data['workflow']}")
11041106

11051107
if embeddings_s3uri != '':
11061108
shared.s3_download(embeddings_s3uri, shared.cmd_opts.embeddings_dir)

0 commit comments

Comments
 (0)