Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added Accelerating Product Innovation App #545

Merged
merged 240 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 146 commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
fde5221
feat: Added all files for Accelerating Product Innovation App.
navyasingla Apr 16, 2024
3169a21
fix: corrected files
navyasingla Apr 16, 2024
a43dc09
fix: removed wrong folder
navyasingla Apr 16, 2024
ca760af
fix: added correct folder
navyasingla Apr 16, 2024
f3f8dca
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 16, 2024
babf6b3
fix: Linting
navyasingla Apr 16, 2024
0dcc1a7
merged
navyasingla Apr 16, 2024
2799297
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 16, 2024
d3f5612
fix: markdown
navyasingla Apr 16, 2024
8c27b5c
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 16, 2024
ebcf55a
fix: Linting Errors
navyasingla Apr 16, 2024
2391ee0
fix: Linting
navyasingla Apr 17, 2024
4849441
Merge branch 'main' into main
holtskinner Apr 17, 2024
38d7fc3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 17, 2024
05133f8
Move README images to GCS Bucket
holtskinner Apr 17, 2024
bdc204e
Moved app/images/ to GCS
holtskinner Apr 17, 2024
e92b69b
Move pickle files to GCS
holtskinner Apr 17, 2024
1c96fdd
fix: made bash file executable
navyasingla Apr 17, 2024
7084aad
fix: Removed streamlit config
navyasingla Apr 17, 2024
d2276ca
Rename Readme.md to README.md
navyasingla Apr 17, 2024
06d27fc
Rename Setup.md to SETUP.md
navyasingla Apr 17, 2024
e4fc66a
fix: linting
navyasingla Apr 17, 2024
a24d3cb
Merge branch 'main' into main
holtskinner Apr 18, 2024
2c715cc
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 18, 2024
d2e6f09
Merge branch 'main' into main
holtskinner Apr 19, 2024
7543cb6
Merge branch 'main' into main
holtskinner Apr 19, 2024
76074bb
fix: reduced files in pages_utils
navyasingla Apr 20, 2024
50716b7
fix: reduced files in pages_utils
navyasingla Apr 20, 2024
51b4545
fix: minor changes
navyasingla Apr 20, 2024
1b40514
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 22, 2024
72af106
Merge branch 'main' into main
holtskinner Apr 24, 2024
3bf609e
fix: created common functions for page setup
navyasingla Apr 24, 2024
82b10a0
merge
navyasingla Apr 24, 2024
0326cc4
fix: removed use of b64 for header images
navyasingla Apr 25, 2024
597b5f4
fix: refactoring
navyasingla Apr 25, 2024
ec03d3f
added css files
navyasingla Apr 25, 2024
1aee366
Merge branch 'main' into main
holtskinner Apr 25, 2024
b051d7a
added Typing
navyasingla Apr 25, 2024
b0411c5
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 25, 2024
467ed3e
fix: formatting
navyasingla Apr 25, 2024
33116b5
fix: formatting
navyasingla Apr 25, 2024
65fdf10
fix: Linting
navyasingla Apr 25, 2024
9e8e936
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 25, 2024
a4b89b1
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla Apr 25, 2024
9f397c8
fix: cleaned utils
navyasingla Apr 26, 2024
a6b3408
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 26, 2024
5e5c5f7
fix: separated html
navyasingla Apr 26, 2024
8c86327
refactor
navyasingla Apr 26, 2024
042cce9
fix: simplified sidebar styling
navyasingla Apr 26, 2024
3efbf20
Merge branch 'main' into main
navyasingla Apr 26, 2024
8476013
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 26, 2024
a6b0cb6
refactor
navyasingla Apr 26, 2024
ed32df3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 26, 2024
48d9ecf
logic for image editing without gapic
navyasingla Apr 27, 2024
65ac1cb
removed gapic from imagen
navyasingla Apr 27, 2024
e2de66f
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 27, 2024
df35564
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 27, 2024
fae43c8
removed gapic from imagen cloud func
navyasingla Apr 27, 2024
33b7203
minor change
navyasingla Apr 27, 2024
612d24b
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 27, 2024
6c38b2b
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 27, 2024
1385507
removed gapic from text embeddings
navyasingla Apr 27, 2024
3c47182
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 27, 2024
0078ef2
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 27, 2024
9cd86e2
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla Apr 28, 2024
4ce01fb
fix: formatted imports
navyasingla Apr 29, 2024
e127af1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 29, 2024
e9a56a2
linting
navyasingla Apr 29, 2024
95bc9a5
merge
navyasingla Apr 29, 2024
5341312
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 29, 2024
c75cf97
added __init__
navyasingla Apr 29, 2024
fc48785
merge
navyasingla Apr 29, 2024
6dd3e54
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 29, 2024
7b6af0f
minor changes
navyasingla Apr 29, 2024
bf96815
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 29, 2024
dd0ccad
minor change
navyasingla Apr 30, 2024
39fe7f9
revert
navyasingla Apr 30, 2024
06d1cc3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 30, 2024
438c669
linting
navyasingla Apr 30, 2024
9112bc0
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla Apr 30, 2024
386b095
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla Apr 30, 2024
54d362e
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla Apr 30, 2024
5bbbffb
Merge branch 'main' into main
holtskinner Apr 30, 2024
67b2149
Merge branch 'main' into main
holtskinner May 1, 2024
76a54a4
added requirements
navyasingla May 2, 2024
69d96ca
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 2, 2024
e1d1fbe
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 2, 2024
690dc31
fix: linting
navyasingla May 2, 2024
db1f170
linting
navyasingla May 2, 2024
3155a8e
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 2, 2024
2e34ed4
check
vertikasah May 2, 2024
dfeb02f
linting
navyasingla May 2, 2024
561dc3a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 2, 2024
c6f036a
fix: added requirements
navyasingla May 2, 2024
2e8f221
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 2, 2024
fabce64
linting
navyasingla May 2, 2024
746da6b
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 2, 2024
e7fb80a
fix: linting
navyasingla May 3, 2024
85b2b4f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
b64f68a
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 3, 2024
d98697d
fix:linting
navyasingla May 3, 2024
eac1d47
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 3, 2024
c66774f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
a1b4cc6
moved requirements
navyasingla May 3, 2024
e2300b8
moved requirements
navyasingla May 3, 2024
a93e363
fix: linting errors
navyasingla May 3, 2024
9cdef58
minor change
navyasingla May 3, 2024
0db479a
minor change
navyasingla May 3, 2024
68002ca
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
a709e1f
linter changes
navyasingla May 3, 2024
74c02ad
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
fe94c92
liting
navyasingla May 3, 2024
a939492
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
6cf0a79
revert
navyasingla May 3, 2024
903b14a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
677ba0c
corrected unable to import
navyasingla May 3, 2024
495df43
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 3, 2024
cb16453
corrected unable to import
navyasingla May 3, 2024
8172f8f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
9f31724
fix: linting
navyasingla May 3, 2024
b9ba973
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2024
d994a44
added toml config
navyasingla May 4, 2024
1ca6975
testing
navyasingla May 4, 2024
68a1d7e
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
b94c2c0
linting
navyasingla May 4, 2024
43ae4d9
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
be64ce6
linting
navyasingla May 4, 2024
8fa4bdd
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
de2f5dd
Merge branch 'main' into main
navyasingla May 4, 2024
86601d8
corrected bash script
navyasingla May 4, 2024
8cf8d1b
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
c0d859c
linting
navyasingla May 4, 2024
dbedfa4
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
e474ef3
linting
navyasingla May 4, 2024
85cf1e3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
4f378c2
linting
navyasingla May 4, 2024
6e381f1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
b65c7e8
shell script formatted
navyasingla May 4, 2024
c584fb6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 4, 2024
b273b3c
shell formatting
navyasingla May 5, 2024
e6528fd
shell formatting
navyasingla May 5, 2024
22e5efb
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 5, 2024
47ea67c
Merge branch 'main' into main
holtskinner May 7, 2024
438e16d
Update linter.yaml
holtskinner May 7, 2024
e055134
Ran `shfmt`
holtskinner May 7, 2024
b3780c9
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 8, 2024
904528b
fix: refactored
navyasingla May 8, 2024
598fc06
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 8, 2024
d7935c5
fix: linting errors
navyasingla May 9, 2024
cf790c2
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 9, 2024
c9c65c4
testing: lint errors
navyasingla May 9, 2024
087bdd1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 9, 2024
5fa9267
fix:renamed utils
navyasingla May 9, 2024
5b266c5
code clean up
navyasingla May 9, 2024
024161f
cleaned up project utils
navyasingla May 9, 2024
d45f3bc
minor change
navyasingla May 9, 2024
a0e9e52
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 9, 2024
de04098
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 9, 2024
3d5f1e1
Merge branch 'main' of https://github.com/navyasingla/generative-ai
gcf-owl-bot[bot] May 9, 2024
ae3882a
code cleanup
navyasingla May 9, 2024
0f25969
merge
navyasingla May 9, 2024
2511fa1
changes
navyasingla May 9, 2024
8cdf1ba
corrected errors in file upload
navyasingla May 10, 2024
616705f
fix: refactored
navyasingla May 10, 2024
2b9b888
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
058b8d6
fix: refactor
navyasingla May 10, 2024
2d08c1d
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 10, 2024
4ef1785
fix: refactored and corrected errors
navyasingla May 10, 2024
2dae2cc
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
1e0d3ee
global settings
navyasingla May 10, 2024
8752edd
merge
navyasingla May 10, 2024
244de15
linting
navyasingla May 10, 2024
a70c6c3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
c4b9372
linting
navyasingla May 10, 2024
3ca00b2
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
28c572e
linting
navyasingla May 10, 2024
a340fb5
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
71195ad
linting
navyasingla May 10, 2024
76e1d7b
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
ad23513
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 10, 2024
832d789
linting
navyasingla May 10, 2024
fab091e
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
1b9f40e
added var names
navyasingla May 10, 2024
4793bf0
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 10, 2024
3c84483
testing lint
navyasingla May 10, 2024
43afcdc
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 10, 2024
75121d8
fix: linting
navyasingla May 10, 2024
408440f
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 10, 2024
28d7d85
Merge branch 'main' into main
navyasingla May 11, 2024
1ce1f39
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 13, 2024
a875aba
lint changes
navyasingla May 13, 2024
990ebd7
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 13, 2024
386274d
fix: import errors
navyasingla May 13, 2024
e27330c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 13, 2024
6bbccd6
Merge branch 'main' of https://github.com/GoogleCloudPlatform/generat…
holtskinner May 15, 2024
0919dac
Merge branch 'main' into main
holtskinner May 15, 2024
c7968c4
Add Pylint ignore for E0401
holtskinner May 15, 2024
ea3c2a0
spell check
navyasingla May 16, 2024
8b42a7a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
dd28612
spelling correction
navyasingla May 16, 2024
52ee8bc
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 16, 2024
af26a86
Merge branch 'GoogleCloudPlatform:main' into main
navyasingla May 16, 2024
951222e
spelling errors corrected
navyasingla May 16, 2024
106cca9
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 16, 2024
a178ed2
minor change
navyasingla May 16, 2024
ef4e6e2
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
1c83a77
fixes
navyasingla May 16, 2024
8f40622
fixes
navyasingla May 16, 2024
2122897
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
181214e
minor change
navyasingla May 16, 2024
aabe2c8
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 16, 2024
5011663
spell check changes
navyasingla May 16, 2024
dbccfcb
minor change
navyasingla May 16, 2024
dc326eb
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
59f861a
Merge branch 'main' of https://github.com/navyasingla/generative-ai
gcf-owl-bot[bot] May 16, 2024
cf5659c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
670ffe7
Merge branch 'main' of https://github.com/navyasingla/generative-ai
gcf-owl-bot[bot] May 16, 2024
a7c6b5d
linted
navyasingla May 16, 2024
21a4218
logger correction
navyasingla May 16, 2024
77cfe26
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
dc0bd08
logger correction
navyasingla May 16, 2024
cbd6557
logger correction
navyasingla May 16, 2024
11170be
Merge branch 'main' of https://github.com/navyasingla/generative-ai
navyasingla May 16, 2024
158e38c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 16, 2024
3d01ab5
Merge branch 'main' into main
navyasingla May 22, 2024
897805a
Merge branch 'main' into main
holtskinner May 28, 2024
98e0dbe
Add false-positive spelling errors into allowlist
holtskinner May 28, 2024
a6bcf98
Merge branch 'main' into main
holtskinner May 28, 2024
6b0519d
Merge branch 'main' into main
holtskinner May 28, 2024
7d4c462
Adjust `.mypy.ini`
holtskinner May 28, 2024
8e61fa9
Remove strict
holtskinner May 28, 2024
5e6a80a
Add disable for error codes
holtskinner May 28, 2024
944c343
Fix disable_error code
holtskinner May 28, 2024
2481d30
Fix mypy errors
holtskinner May 28, 2024
e65f03f
Fix formatting
holtskinner May 28, 2024
80ff5c5
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 28, 2024
f6dd2d0
Merge branch 'main' of https://github.com/navyasingla/generative-ai
gcf-owl-bot[bot] May 28, 2024
ccb6cf5
Fix mypy errors
holtskinner May 28, 2024
70be20e
Fixed protected-access
holtskinner May 28, 2024
2533670
Merge branch 'main' into main
holtskinner May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"owlbot:run":
- all:
- base-branch: ['main']
- base-branch: ["main"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


[server]
runOnSave = true

port = 8080

[browser]
gatherUsageStats = false
serverAddress = "0.0.0.0"

[theme]
base="light"
primaryColor="#0066cc"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

[[pages]]
path = "app/home_page.py"
name = "Home Page"

[[pages]]
path = "app/pages/resources.py"
name = "Resources"

[[pages]]
path = "app/pages/product_insights.py"
name = "Product Insights"

[[pages]]
path = "app/pages/product_generation.py"
name = "Product Generation"

[[pages]]
path = "app/pages/edit_image.py"
name = "Edit Image"
138 changes: 138 additions & 0 deletions gemini/sample-apps/accelerating_product_innovation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Generative AI Demos - Accelerating Product Innovation

## Introduction

This solution is for product category and brand owners, product R&D analysts, marketers, and any personas owning the development of new products, in CPG, or any other vertical, where there is a need for a rapid and adaptive pace of new product and new product variant innovation. The solution enables users to leverage Generative AI’s purely creative capabilities to new ideas and new concepts for new products.

In fast and dynamic markets there is a need to,

- shorten lead time for new product development; and
- achieve draft ideas in bulk with minimal or without human-in-the-loop

This Streamlit-based solution empowers product managers, R&D specialists, and marketers to harness the power of Generative AI for accelerated product development, discover how to rapidly generate new product concepts, address market trends, and ensure regulatory compliance within the CPG sector and beyond.

## Getting Started

To access the application, follow the steps in `Setup.md`. Once you have the solution running, follow these procedures within the application to generate innovative ideas for any product:

- **Navigate to the 'Resources' page.**
- **Project Setup**: Begin by creating a new project or selecting an existing one.
- **Document Upload**: Add relevant research and data files in accepted formats.
- **For Q&A on uploaded files, navigate to 'Product Insights' page**
- **Insight Generation**: Ask questions to extract critical information from your data.
- **For Product Idea generation, navigate to 'Product Generation' page**
- **Concept Creation**: Initiate product generation using sample queries or creater your own custom query.
- **Refinement**: Select features, experiment with combinations, and regenerate results until the desired product concept is achieved.

## Application Workflow

1. **Project Setup**
You have the option to either create a new project or select an existing project in the resources page of the application for generating product insights. Choose one of the following steps:

- **New Project Creation**:
- Initiate a new project within the application by giving it a descriptive name (e.g., "2024 Sunscreen Innovation" or "Haircare Line Extension").
- Once a project is created, the document upload process is mandatory before proceeding to analysis features.
- **Existing Project Modification**:
- Select an existing project from a list.
- View previously uploaded documents associated with the project.
- Use the following actions:
- Add Files: Upload new documents relevant to the project.
- Remove Files: Delete documents that are outdated or no longer relevant to the project goals.
- Delete Project: Entirely remove the project and all the resources associated with it.

### 1. Document Upload

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/resource_upload.gif" alt="Image Description" width="600"/>
</p>

- **Objective**: Integrate your critical project data for analysis with the solution.
- **Accepted File Formats**:
Various types of documents such as market research reports, consumer feedback surveys, Internal trend analyses, regulatory guidelines can be uploaded. Accepted file formats include:
- Documents: .pdf, .doc, .docx
- Spreadsheets: .xlsx, .csv
- Text Files: .txt, .md

### 2. Product Insights

- **Dynamic Suggestions**

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/suggestions.png" alt="Image Description" width="600"/>
</p>

- **Objective**: This feature generates contextually relevant suggestions designed to extract essential product insights and attributes companies deem important.
- **Functionality**: The system leverages information embedded in the documents you've uploaded (market research, surveys, etc.) to tailor sample queries.
- **Usage**: Choose to utilize a suggested sample query for immediate results. Customize the sample query or input your own questions to drive a more focused analysis.

- **Generative AI Powered Product Insights**
- **Objective**: This feature unlocks insights hidden within your uploaded documents. You pose questions in natural language, and the system retrieves contextually relevant answers.
- **Functionality**: Rapid insight extraction: Obtain actionable answers directly from your data without time-consuming manual analysis.
- **Usage**: Type your question in natural language as if you were asking a domain expert.
- **Question Types**:
- Facts
- Trends
- Relationships
- Comparisons

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/insights.png" alt="Image Description" width="600"/>
</p>

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/follow_up_qs.png" alt="Image Description" width="600"/>
</p>

- **Benefits**
- **Document Compatibility**: The AI-Powered Question Answering functionality is optimized for document types including: Market Research Reports, Consumer Feedback Surveys, Internal Trend Analyses.

### 3. Product Generation

- **Dynamic Sample Queries**

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/queries.png" alt="Image Description" width="600"/>
</p>

- **Objective**: This feature generates contextually relevant questions designed to extract essential product attributes consumers deem important within your chosen category.
- **Functionality**: The system leverages information embedded in the documents you've uploaded (market research, surveys, etc.) to tailor sample queries.
- **Usage**: Choose to utilize a suggested sample query for immediate results. Customize the sample query or input your own questions to drive a more focused analysis.

- **Key Feature Extraction**

- **Objective**: Isolates the most frequently mentioned or prioritized product features that emerge from the analysis of your uploaded documents.
- **Functionality**: Employs text analysis techniques to extract key features. Extracts ingredients, benefits, claims, sensory terms, usage occasions, and more.
- **Output**: Creates a curated list of extracted features.

- **Feature Selection**

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/features.png" alt="Image Description" width="600"/>
</p>

- **Objective**: Gives you direct control in constructing your ideal product concept.
- **Functionality**: Presents the extracted list of key features for selection. Enables both single feature selection and the creation of novel feature combinations.

- **Product Concept Generation**

- **Objective**: Transforms selected features into holistic product concepts, going beyond simply listing ingredients or attributes.
- **Functionality**: Utilizes Generative AI, trained on product descriptions, marketing material, and relevant category data. Presents multiple plausible product ideas based on your selections.
- **Output**: Presents a series of product ideas featuring the AI-generated concepts, helping to visualize the creative possibilities.

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/product.png" alt="Image Description" width="600"/>
</p>

### 4. Selective Regeneration

- **Objective**: Enables users to zero in on specific areas of the product concept that they wish to modify without re-generating the whole concept from scratch.
- **Functionality**: Text Modification, Image Modification, Whole Product Regeneration.

<p align="center">
<img src="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/readme_images/text_regen.gif" alt="Image Description" width="600"/>
</p>

### 5. Export Content

- **Objective**: Once you've refined your product concept through the iterative process, the solution provides seamless ways to share your work and integrate it into your broader product development workflows.
- **Functionalities**: PDF Export, Export/Download, Email Export.
84 changes: 84 additions & 0 deletions gemini/sample-apps/accelerating_product_innovation/SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Setup Steps

The solution supports both local execution and deployment to Cloud Run environments.

## Running Locally

1. **Clone Repository**: Clone the repository containing the solution's code to your local machine.
2. **Install Dependencies**: Navigate to the project directory and install dependencies from requirements.txt using pip.
3. **Set Environment Variables**: Create a `.env` file in the project directory and populate it with necessary environment variables:

```plaintext
PROJECT_ID=<Your_Google_Cloud_Project_ID>
LOCATION=<Desired_Location>
REGION=<Desired_Google_Cloud_Project_Region>
YOUR_EMAIL=<Your_Email_Address_Associated_With_Google_Cloud_Project>
PROJECT_NUMBER=<Your_Google_Cloud_Project_Number>
```

4. **Run the Application**: Execute the following command to run the application locally:

```bash
python -m streamlit run app/Home.py
```

5. **Access the Application**: Once the application is running locally, access it through a web browser using the specified local host address and port.

## Deployment Steps

Follow the below steps to deploy the solution to Cloud Run environment.

### Google Cloud Storage Setup

1. **Create Bucket**: Manually create GCS bucket 'product_innovation_bucket' using either the GCP Console or command-line tools (gsutil). The bucket is necessary for:

- `document_uploads`: Stores market research, surveys, trend reports, etc.
- `generated_products`: Stores output images, descriptions, etc.
- `image_edits`: Stores intermediate/modified images during the regeneration process.

**Using the GCP Console (Web Interface):**

- Navigate to the [Google Cloud Storage section](https://console.cloud.google.com/storage/browser) of your GCP console.
- Click on the "Create Bucket" button.
- Provide the following details:
- **Name**: Enter 'product_innovation_bucket' as bucket name.
- **Location**: Choose a region closest to where your solution will operate for best performance.
- **Storage Class**: Select the class based on frequency of access and cost considerations.
- **Advanced Settings**: Adjust encryption, access control, etc., if necessary.
- Click "Create".

**Using the 'gsutil' Command-Line Tool:**

- Ensure that you have the gcloud SDK installed and 'gsutil' configured.
- Run the following command in your terminal, replacing `<region>` with your desired bucket location:

```bash
gsutil mb -l <region> gs://product_innovation_bucket
```

### Environment Setup

1. Ensure that the `configure_resources` script is in the directory containing the solution's code.
2. Edit the file named `env.txt` within the same directory and populate it with the same values as mentioned above.
3. Create a `.env` file in the 'cloud_functions' directory and populate it with necessary environment variables as mentioned above.

### Execute the Script

- Open a terminal and navigate to the directory containing the script and `env.txt` file.
- Run the script `configure-resources.sh` using the command:

```bash
sh configure-resources.sh
```

- The script will:
- Parse `env.txt` to obtain project details.
- Initialize gcloud and set project configuration.
- Set up a service account with necessary IAM roles.
- Deploy Cloud Functions (`imagen-call`, `gemini-call`, `text-embedding`).
- Capture URLs for deployed Cloud Functions.
- Deploy the main application to Cloud Run.
- Ensure that the service account has been created and manually grant the following roles to the created service account `retail-accelerating-prod-i-982@[PROJECT_ID].iam.gserviceaccount.com`:
- Service account user
- Cloud Run Admin
- Cloud Storage Admin
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# -----------------------------------------------------------------------------
# Translation options
# -----------------------------------------------------------------------------
[translate_api]

# Include or remove languages as needed. Use the this documentation as
# reference: https://cloud.google.com/translate/docs/languages
Spanish = "es"
Chinese = "zh"
German = "de"
Japanese = "ja"
Portuguese = "pt"


# -----------------------------------------------------------------------------
# Configurations for page: Home.py
# -----------------------------------------------------------------------------
[pages.home]

page_title = "Gen AI for Product Innovation"
page_icon = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/favicon.png"
sidebar_image_path = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/main_logo.png"
home_img_1 = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/intro_home_1.png"
home_img_2 = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/intro_home_2.png"


# -----------------------------------------------------------------------------
# Configurations for page: 1_Resources.py
# -----------------------------------------------------------------------------
[pages.1_Resources]

page_title = "Resources"
page_icon = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/favicon.png"
sidebar_image_path = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/main_logo.png"
resources_img="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/resources_img.png"

# -----------------------------------------------------------------------------
# Configurations for page: 2_ Marketing_Insights.py
# -----------------------------------------------------------------------------

[pages.2_Marketing_Insights]
page_title = "Marketing Insights"
page_icon = "./images/favicon.png"
sidebar_image_path = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/main_logo.png"
prod_insights_1="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/prod_insights_1.png"
prod_insights_2="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/prod_insights_2.png"


# -----------------------------------------------------------------------------
# Configurations for page: 3_Generations.py
# -----------------------------------------------------------------------------

[pages.3_Generations]
page_title = "Generations"
page_icon = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/favicon.png"
sidebar_image_path = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/main_logo.png"
prod_gen_img="https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/prod_gen_img.png"



# -----------------------------------------------------------------------------
# Configurations for page: Editor.py
# -----------------------------------------------------------------------------

[pages.Editor]
page_title = "Editor"
page_icon = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/favicon.png"
sidebar_image_path = "https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/main_logo.png"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
div.row-widget > button:first-child {
border-radius: 25px;
}

[class = "st-emotion-cache-1e9n592 ef3psqc11"] {
border-radius: 25px !important;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.element-container:has(#button-after) + div button {
min-height: 100px;
max-width: 500px;
min-width: 500px;
border-radius: 25px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[data-testid="stSidebarNav"] {
background-image: url("https://storage.googleapis.com/github-repo/generative-ai/sample-apps/accelerating-product-innovation/app_images/main_logo.png");
background-repeat: no-repeat;
background-position: 50% 10%;
margin-top: 5%;
background-size:80%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<html>
<head>
<title>Start Auto Download file</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script>
$('<a href="data:application/zip;base64,{b64}" download="{download_filename}">')[0].click()
</script>
</head>
</html>