Skip to content

Commit

Permalink
move config info into code
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Nov 25, 2023
1 parent d79b0ec commit 1eeca98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/example_ai_translate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python

import os
import sys
import CloudFlare

Expand All @@ -16,6 +17,9 @@ def translate_call(cf):

def doit(account_name, english_text):

# Or place these in your cloudflare.cfg file
os.environ['CLOUDFLARE_API_EXTRAS'] = '/accounts/:id/ai/run/@cf/meta/m2m100-1.2b'

cf = CloudFlare.CloudFlare()

try:
Expand Down

0 comments on commit 1eeca98

Please sign in to comment.