GUI update, hide some files
Browse files
Experiments/Baseline/GUI.py
CHANGED
@@ -5,6 +5,7 @@ from PIL import Image
|
|
5 |
from google.oauth2 import service_account
|
6 |
from baseline_utils import detect_text_in_image, summarize_diary_text, analyze_writer_image, generate_comic_book
|
7 |
import glob
|
|
|
8 |
|
9 |
# Load secrets
|
10 |
openai_api_key = st.secrets["general"]["openai_api_key"]
|
@@ -30,9 +31,9 @@ if uploaded_diary and uploaded_writer_image:
|
|
30 |
writer_image = Image.open(uploaded_writer_image)
|
31 |
|
32 |
# Save the file-like objects as image files (optional if needed)
|
33 |
-
diary_image_path = "temp_diary_image.png"
|
34 |
-
writer_image_path = "temp_writer_image.png"
|
35 |
-
|
36 |
diary_image.save(diary_image_path)
|
37 |
writer_image.save(writer_image_path)
|
38 |
|
|
|
5 |
from google.oauth2 import service_account
|
6 |
from baseline_utils import detect_text_in_image, summarize_diary_text, analyze_writer_image, generate_comic_book
|
7 |
import glob
|
8 |
+
import os
|
9 |
|
10 |
# Load secrets
|
11 |
openai_api_key = st.secrets["general"]["openai_api_key"]
|
|
|
31 |
writer_image = Image.open(uploaded_writer_image)
|
32 |
|
33 |
# Save the file-like objects as image files (optional if needed)
|
34 |
+
diary_image_path = "temp_upload_images/temp_diary_image.png"
|
35 |
+
writer_image_path = "temp_upload_images/temp_writer_image.png"
|
36 |
+
os.makedirs("temp_upload_images", exist_ok=True)
|
37 |
diary_image.save(diary_image_path)
|
38 |
writer_image.save(writer_image_path)
|
39 |
|
Experiments/Baseline/input_images/test_sample.jpeg
DELETED
Binary file (168 kB)
|
|
Experiments/Baseline/input_images/writer.jpeg
DELETED
Binary file (67.1 kB)
|
|