diff --git a/.projenrc.ts b/.projenrc.ts index d79b53ae..ac29df7e 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -361,6 +361,9 @@ pythonPocs.push(new StreamlitQuickStartPOC({ parentProject: project, pocName: 'Amazon Bedrock Chat POC', pocPackageName: 'amazon-bedrock-chat-poc', + gitIgnore: [ + 'chat_history.txt', + ], additionalDeps: [ 'langchain@^0.1', 'langchain-community', diff --git a/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-alt-text-generator/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-amazon-athena-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-amazon-rds-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-amazon-redshift-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-asynchronous-invocation-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.gitignore index 70ae3a77..4ae471f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.gitignore @@ -1,4 +1,7 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* +chat_history.txt node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-chat-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-image-analysis-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-long-form-output-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-multi-modal-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-claude3-streaming-response-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-converse-api-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-converse-stream-api-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-csv-chatbot-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-document-comparison-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-document-generator-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-genai-dynamic-prompting-explained-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-guardrails-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-image-generation-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-knowledgebases-rag-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-langchain-rag-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-meeting-minutes-summarization-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.gitignore index 3f778d7d..99d5ce5f 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-model-customization/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-model-eval-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-model-playground-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-powerpoint-generator-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-rag-kendra-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-rag-opensearch-serverless-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-semantic-cache-poc-main/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-speech-to-text-chat-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-streaming-response-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-summarization-long-document-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-task-classification/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-text-extraction-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-translation-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.gitignore b/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.gitignore index 70ae3a77..2594e9f5 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.gitignore +++ b/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.gitignore @@ -1,4 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.env/* +venv/* node_modules/ !/.gitattributes !/.projen/tasks.json diff --git a/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.projen/tasks.json b/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.projen/tasks.json index da35b784..816390e0 100644 --- a/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.projen/tasks.json +++ b/genai-quickstart-pocs-python/amazon-bedrock-video-chapter-creator-poc/.projen/tasks.json @@ -62,6 +62,15 @@ "name": "pre-compile", "description": "Prepare the project for compilation" }, + "start": { + "name": "start", + "description": "Run Streamlit app in virtual environment", + "steps": [ + { + "exec": "[ ! -d \".env\" ] && python3 -m venv .env || true && sh -c \"source .env/bin/activate && trap deactivate EXIT && streamlit run app.py\"" + } + ] + }, "test": { "name": "test", "description": "Run tests", diff --git a/projenrc/projects/streamlit-quickstart-poc.ts b/projenrc/projects/streamlit-quickstart-poc.ts index 216227e8..d0adce02 100644 --- a/projenrc/projects/streamlit-quickstart-poc.ts +++ b/projenrc/projects/streamlit-quickstart-poc.ts @@ -12,6 +12,7 @@ interface StreamlitQuickStartPOCProps { pocDescription?: string; additionalDeps?: string[]; excludeFromReadmeManagement?: boolean; + gitIgnore?: string[]; readme?: { additionalPrerequisits?: string[]; pocGoal?: { @@ -52,13 +53,11 @@ export class StreamlitQuickStartPOC extends PythonProject { projenrcTs: true, name: props.pocPackageName, description: props.pocDescription, - deps: [ - 'streamlit', - 'boto3', - 'botocore', - 'python-dotenv', - ], + deps: ['streamlit', 'boto3', 'botocore', 'python-dotenv'], pip: true, + gitIgnoreOptions: { + ignorePatterns: ['.env/*', 'venv/*', ...props.gitIgnore ?? []], + }, venv: true, sample: false, authorEmail: 'no-email@aws.amazon.com', @@ -72,6 +71,17 @@ export class StreamlitQuickStartPOC extends PythonProject { for (const dep of props.additionalDeps ?? []) { this.addDependency(dep); } + + this.addTask('start', { + description: 'Run Streamlit app in virtual environment', + exec: [ + // Create venv if it doesn't exist + '[ ! -d ".env" ] && python3 -m venv .env || true', + + // Run everything else in a single bash context to maintain the activated venv + 'sh -c "source .env/bin/activate && trap deactivate EXIT && streamlit run app.py"', + ].join(' && '), + }); new POCProjectFiles(this, props); } @@ -87,15 +97,19 @@ export class StreamlitQuickStartPOC extends PythonProject { postSynthesize() { // Overriding the default postSynth to avoid every POC installing dependencies! } -} + + runPOC() { + this.envManager.setupEnvironment(); + } +} + class POCProjectFiles extends Component { private pocProps: StreamlitQuickStartPOCProps; constructor(project: Project, props: StreamlitQuickStartPOCProps) { super(project); this.pocProps = props; - } /** * Synthesize the project files @@ -107,11 +121,10 @@ class POCProjectFiles extends Component { } new HOWTO(this.project).synthesize(); if (!this.pocProps.skipApp) { - new AppDotPy(this.project).synthesize(); + new AppDotPy(this.project); } } - } class README extends TextFile { @@ -137,7 +150,11 @@ class README extends TextFile { class HOWTO extends SampleFile { constructor(scope: Project) { - const HOWTO_TEMPLATE: string = path.join(__dirname, 'resources', 'streamlit-howto.md'); + const HOWTO_TEMPLATE: string = path.join( + __dirname, + 'resources', + 'streamlit-howto.md', + ); const howtoTemplate = fs.readFileSync(HOWTO_TEMPLATE, 'utf-8'); super(scope, 'HOWTO.md', { contents: howtoTemplate, @@ -153,4 +170,4 @@ class AppDotPy extends SampleFile { contents: appTemplate, }); } -} \ No newline at end of file +}