Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 1eeca98

Browse files
committed
move config info into code
1 parent d79b0ec commit 1eeca98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/example_ai_translate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22

3+
import os
34
import sys
45
import CloudFlare
56

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

1718
def doit(account_name, english_text):
1819

20+
# Or place these in your cloudflare.cfg file
21+
os.environ['CLOUDFLARE_API_EXTRAS'] = '/accounts/:id/ai/run/@cf/meta/m2m100-1.2b'
22+
1923
cf = CloudFlare.CloudFlare()
2024

2125
try:

0 commit comments

Comments
 (0)