Spaces:
Sleeping
Sleeping
File size: 878 Bytes
2fd8593 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | """
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")
|