Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -100,12 +100,11 @@ def main():
|
|
100 |
if uploaded_file is not None:
|
101 |
print(uploaded_file)
|
102 |
bytes_data = uploaded_file.getvalue()
|
103 |
-
with open(uploaded_file.name, "wb") as file:
|
104 |
-
file.write(bytes_data)
|
105 |
st.image(uploaded_file, caption="Processing Image", use_column_width=True)
|
|
|
|
|
106 |
|
107 |
-
|
108 |
-
pipeline_1_out, person_count = pipeline_1_final(uploaded_file)
|
109 |
pipeline_2_age = pipeline_2_final(pipeline_1_out)
|
110 |
pipeline_3_gender = pipeline_3_final(pipeline_1_out)
|
111 |
pipeline_4_emotion = pipeline_3_final(pipeline_1_out)
|
|
|
100 |
if uploaded_file is not None:
|
101 |
print(uploaded_file)
|
102 |
bytes_data = uploaded_file.getvalue()
|
|
|
|
|
103 |
st.image(uploaded_file, caption="Processing Image", use_column_width=True)
|
104 |
+
uploaded_file.save(temp_file.name)
|
105 |
+
saved_file_path = temp_file.name
|
106 |
|
107 |
+
pipeline_1_out, person_count = pipeline_1_final(saved_file_path)
|
|
|
108 |
pipeline_2_age = pipeline_2_final(pipeline_1_out)
|
109 |
pipeline_3_gender = pipeline_3_final(pipeline_1_out)
|
110 |
pipeline_4_emotion = pipeline_3_final(pipeline_1_out)
|