santhosh97 commited on
Commit
847470e
·
1 Parent(s): 690feab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -201,21 +201,20 @@ def zip_and_upload_images(identifier: str, uploaded_files: List[BytesIO], image_
201
  return s3_path
202
 
203
  def train_model(model_inputs):
204
- if cli_args.dry_run:
205
- logger.info("Skipping model training since --dry-run is enabled.")
206
- logger.info(f"model_inputs: {model_inputs}")
207
- return
208
-
209
- if cli_args.train_endpoint_url is None:
210
- # Use banana backend
211
- api_key = "03cdd72e-5c04-4207-bd6a-fd5712c1740e"
212
- model_key = "1a3b4ce5-164f-4efb-9f4a-c2ad3a930d0b"
213
- st.markdown(str(model_inputs))
214
- print(model_inputs)
215
- _ = banana.run(api_key, model_key, model_inputs)
216
- else:
217
- # Send request directly to specified url
218
- _ = requests.post(cli_args.train_endpoint_url, json=model_inputs)
219
 
220
 
221
  def switch_ux_state(new_state: UxState):
 
201
  return s3_path
202
 
203
  def train_model(model_inputs):
204
+ logger.info("Skipping model training since --dry-run is enabled.")
205
+ logger.info(f"model_inputs: {model_inputs}")
206
+ st.markdown(str(model_inputs))
207
+
208
+ # if cli_args.train_endpoint_url is None:
209
+ # # Use banana backend
210
+ # api_key = "03cdd72e-5c04-4207-bd6a-fd5712c1740e"
211
+ # model_key = "1a3b4ce5-164f-4efb-9f4a-c2ad3a930d0b"
212
+ # st.markdown(str(model_inputs))
213
+ # print(model_inputs)
214
+ # _ = banana.run(api_key, model_key, model_inputs)
215
+ # else:
216
+ # # Send request directly to specified url
217
+ # _ = requests.post(cli_args.train_endpoint_url, json=model_inputs)
 
218
 
219
 
220
  def switch_ux_state(new_state: UxState):