Spaces:
Sleeping
Sleeping
| """ | |
| Example: How to use Gemma provider in Blog2Code pipeline | |
| This demonstrates how to modify any of the pipeline scripts to use Gemma instead of OpenAI/Gemini. | |
| """ | |
| import os | |
| # Set the NVIDIA API key | |
| os.environ['NVIDIA_API_KEY'] = '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' | |
| # When running any pipeline script, simply change the provider_name to 'gemma' | |
| # For example, in 1_planning.py, 2_analyzing.py, or 3_coding.py: | |
| # OLD (using OpenAI): | |
| # provider_name = 'openai' | |
| # NEW (using Gemma): | |
| provider_name = 'gemma' | |
| # The rest of the code remains the same! | |
| # The scripts will automatically use the Gemma model with default settings. | |
| print(f"✅ Pipeline configured to use: {provider_name}") | |
| print("You can now run any of the pipeline scripts:") | |
| print(" - python 1_planning.py") | |
| print(" - python 2_analyzing.py") | |
| print(" - python 3_coding.py") | |