Spaces:
Running
Running
Update app.py
Browse filesreasoning_effort, revise
app.py
CHANGED
@@ -33,7 +33,7 @@ def read_readme():
|
|
33 |
INSTRUCTION_TEMPLATES = {
|
34 |
################# PODCAST ##################
|
35 |
"podcast": {
|
36 |
-
"intro": """Your task is to take the input text provided and turn it into an lively, engaging, informative podcast dialogue, in the style of NPR. The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or web pages.
|
37 |
|
38 |
Don't worry about the formatting issues or any irrelevant information; your goal is to extract the key points, identify definitions, and interesting facts that could be discussed in a podcast.
|
39 |
|
@@ -542,15 +542,15 @@ def conditional_llm(model, api_base=None, api_key=None):
|
|
542 |
If api_base is provided, it applies the @llm decorator with api_base.
|
543 |
Otherwise, it applies the @llm decorator without api_base.
|
544 |
"""
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
def decorator(func):
|
550 |
if api_base:
|
551 |
-
return llm(model=model, api_base=api_base,
|
552 |
else:
|
553 |
-
return llm(model=model, api_key=api_key,
|
554 |
return decorator
|
555 |
|
556 |
def generate_audio(
|
|
|
33 |
INSTRUCTION_TEMPLATES = {
|
34 |
################# PODCAST ##################
|
35 |
"podcast": {
|
36 |
+
"intro": """Your task is to take the input text provided and turn it into an lively, engaging, informative podcast dialogue, in the style of NPR. Do not use or make up names. The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or web pages.
|
37 |
|
38 |
Don't worry about the formatting issues or any irrelevant information; your goal is to extract the key points, identify definitions, and interesting facts that could be discussed in a podcast.
|
39 |
|
|
|
542 |
If api_base is provided, it applies the @llm decorator with api_base.
|
543 |
Otherwise, it applies the @llm decorator without api_base.
|
544 |
"""
|
545 |
+
|
546 |
+
#for o-x reasoning models (o1, o3, o4, ...)
|
547 |
+
reasoning_effort="high"
|
548 |
+
|
549 |
def decorator(func):
|
550 |
if api_base:
|
551 |
+
return llm(model=model, api_base=api_base, reasoning_effort=reasoning_effort)(func)
|
552 |
else:
|
553 |
+
return llm(model=model, api_key=api_key, reasoning_effort=reasoning_effort)(func)
|
554 |
return decorator
|
555 |
|
556 |
def generate_audio(
|