Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,8 @@ from crew import get_crew
|
|
| 6 |
lock = threading.Lock()
|
| 7 |
|
| 8 |
LLM = "gpt-4o"
|
| 9 |
-
|
|
|
|
| 10 |
VERBOSE = False
|
| 11 |
|
| 12 |
def invoke(openai_api_key, topic):
|
|
@@ -20,7 +21,7 @@ def invoke(openai_api_key, topic):
|
|
| 20 |
with lock:
|
| 21 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 22 |
|
| 23 |
-
article = str(get_crew(LLM, TEMPERATURE, VERBOSE).kickoff(inputs={"topic": topic}))
|
| 24 |
|
| 25 |
print("===")
|
| 26 |
print(article)
|
|
|
|
| 6 |
lock = threading.Lock()
|
| 7 |
|
| 8 |
LLM = "gpt-4o"
|
| 9 |
+
MAX_TOKENS = 10000
|
| 10 |
+
TEMPERATURE = 0.01
|
| 11 |
VERBOSE = False
|
| 12 |
|
| 13 |
def invoke(openai_api_key, topic):
|
|
|
|
| 21 |
with lock:
|
| 22 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 23 |
|
| 24 |
+
article = str(get_crew(LLM, MAX_TOKENS, TEMPERATURE, VERBOSE).kickoff(inputs={"topic": topic}))
|
| 25 |
|
| 26 |
print("===")
|
| 27 |
print(article)
|