Spaces:
Runtime error
Runtime error
Commit
·
d610380
1
Parent(s):
59741dd
Update app.py
Browse files
app.py
CHANGED
@@ -201,17 +201,17 @@ def zip_and_upload_images(identifier: str, uploaded_files: List[BytesIO], image_
|
|
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 |
-
#
|
210 |
-
|
211 |
-
|
212 |
-
#
|
213 |
-
#
|
214 |
-
|
215 |
# else:
|
216 |
# # Send request directly to specified url
|
217 |
# _ = requests.post(cli_args.train_endpoint_url, json=model_inputs)
|
|
|
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 = "bd2c55f5-84bb-40f9-82fb-196ca68b1c1d"
|
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)
|