Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ except KeyError:
|
|
| 14 |
raise EnvironmentError("Please set the GROQ_API_KEY environment variable")
|
| 15 |
|
| 16 |
# Specify the actual model name
|
| 17 |
-
GROQ_MODEL = "
|
| 18 |
|
| 19 |
SYSTEM_PROMPT = """
|
| 20 |
You are an expert in natural language processing and writing, specializing in transforming AI-generated text into highly natural, human-like prose. Your task is to refine and humanize the given text while adhering to the following guidelines:
|
|
@@ -53,7 +53,7 @@ def humanize_text(AI_text):
|
|
| 53 |
response = client.chat.completions.create(
|
| 54 |
model=GROQ_MODEL,
|
| 55 |
temperature=0.7,
|
| 56 |
-
max_tokens=
|
| 57 |
messages=[
|
| 58 |
{"role": "system", "content": SYSTEM_PROMPT},
|
| 59 |
{"role": "user", "content": USER_PROMPT.format(input_text=AI_text)}
|
|
|
|
| 14 |
raise EnvironmentError("Please set the GROQ_API_KEY environment variable")
|
| 15 |
|
| 16 |
# Specify the actual model name
|
| 17 |
+
GROQ_MODEL = "llama3-groq-8b-8192-tool-use-preview"
|
| 18 |
|
| 19 |
SYSTEM_PROMPT = """
|
| 20 |
You are an expert in natural language processing and writing, specializing in transforming AI-generated text into highly natural, human-like prose. Your task is to refine and humanize the given text while adhering to the following guidelines:
|
|
|
|
| 53 |
response = client.chat.completions.create(
|
| 54 |
model=GROQ_MODEL,
|
| 55 |
temperature=0.7,
|
| 56 |
+
max_tokens=1000,
|
| 57 |
messages=[
|
| 58 |
{"role": "system", "content": SYSTEM_PROMPT},
|
| 59 |
{"role": "user", "content": USER_PROMPT.format(input_text=AI_text)}
|