Update app.py
Browse files
app.py
CHANGED
|
@@ -5,13 +5,13 @@ import os
|
|
| 5 |
|
| 6 |
# Initialize Cohere Client
|
| 7 |
api_key = os.environ["API_KEY"]
|
|
|
|
| 8 |
co = cohere.Client('api_key') # Replace with your Cohere API key
|
| 9 |
|
| 10 |
# Function to generate text using Cohere API
|
| 11 |
# Function to generate text using Cohere API
|
| 12 |
def generate_text(prompt, temperature):
|
| 13 |
response = co.generate(
|
| 14 |
-
model_id = os.environ["Model_ID"],
|
| 15 |
model='model_id', # Replace with your Cohere model ID
|
| 16 |
prompt=prompt,
|
| 17 |
max_tokens= 2000,
|
|
|
|
| 5 |
|
| 6 |
# Initialize Cohere Client
|
| 7 |
api_key = os.environ["API_KEY"]
|
| 8 |
+
mode_id = os.environ['MODEL_ID']
|
| 9 |
co = cohere.Client('api_key') # Replace with your Cohere API key
|
| 10 |
|
| 11 |
# Function to generate text using Cohere API
|
| 12 |
# Function to generate text using Cohere API
|
| 13 |
def generate_text(prompt, temperature):
|
| 14 |
response = co.generate(
|
|
|
|
| 15 |
model='model_id', # Replace with your Cohere model ID
|
| 16 |
prompt=prompt,
|
| 17 |
max_tokens= 2000,
|