Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ import os
|
|
6 |
# Initialize Cohere Client
|
7 |
api_key = os.environ["API_KEY"]
|
8 |
mode_id = os.environ['MODEL_ID']
|
9 |
-
co = cohere.Client(
|
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=
|
16 |
prompt=prompt,
|
17 |
max_tokens= 2000,
|
18 |
temperature=temperature,
|
|
|
6 |
# Initialize Cohere Client
|
7 |
api_key = os.environ["API_KEY"]
|
8 |
mode_id = os.environ['MODEL_ID']
|
9 |
+
co = cohere.Client(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,
|
18 |
temperature=temperature,
|