deeme commited on
Commit
be64bc2
·
verified ·
1 Parent(s): 2691648

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -22
app.py CHANGED
@@ -71,9 +71,6 @@ def process_inputs(
71
  tts_model,
72
  creativity_level,
73
  user_instructions,
74
- api_key_label,
75
- llm_model_name,
76
- longform,
77
  engagement_techniques,
78
  tts_openai_question,
79
  tts_openai_answer,
@@ -189,9 +186,7 @@ def process_inputs(
189
  image_paths=image_paths if image_paths else None,
190
  tts_model=tts_model,
191
  conversation_config=conversation_config,
192
- api_key_label=api_key_label,
193
- llm_model_name=llm_model_name,
194
- longform=longform,
195
  )
196
 
197
  logger.info("Podcast generation completed")
@@ -420,11 +415,11 @@ with gr.Blocks(
420
  info="播客使用的语言"
421
  )
422
 
423
- longform = gr.Checkbox(
424
- label="长篇模式",
425
- value=False,
426
- info="启用长篇内容生成模式"
427
- )
428
 
429
  # Voice Settings
430
  gr.Markdown(
@@ -475,17 +470,17 @@ with gr.Blocks(
475
  info="一些额外的指令,用来帮助AI更好地理解你想要聊天的内容和方向"
476
  )
477
 
478
- api_key_label = gr.Textbox(
479
- label="自定义基于云的 LLM",
480
- value="GEMINI_API_KEY",
481
- info="可选,默认使用 Gemini,如使用 OPENAI,上面填入 'OPENAI_API_KEY' 并保证设置好环境变量且设置好下面的模型"
482
- )
483
 
484
- llm_model_name = gr.Textbox(
485
- label="设置好对应自定义基于云的 LLM 模型",
486
- value="gemini-1.5-pro-latest",
487
- info="可选,配合上面的参数,默认是 Gemini 的 gemini-1.5-pro-latest,默认 OPENAI 可支持模型 api.168369.xyz/v1/models 获取"
488
- )
489
 
490
  # Output Section
491
  gr.Markdown(
@@ -515,7 +510,6 @@ with gr.Blocks(
515
  dialogue_structure, podcast_name,
516
  podcast_tagline, output_language, tts_model,
517
  creativity_level, user_instructions,
518
- api_key_label, llm_model_name, longform,
519
  engagement_techniques, tts_openai_question, tts_openai_answer, ending_message,
520
  ],
521
  outputs=audio_output
 
71
  tts_model,
72
  creativity_level,
73
  user_instructions,
 
 
 
74
  engagement_techniques,
75
  tts_openai_question,
76
  tts_openai_answer,
 
186
  image_paths=image_paths if image_paths else None,
187
  tts_model=tts_model,
188
  conversation_config=conversation_config,
189
+ longform=True,
 
 
190
  )
191
 
192
  logger.info("Podcast generation completed")
 
415
  info="播客使用的语言"
416
  )
417
 
418
+ # longform = gr.Checkbox(
419
+ # label="长篇模式",
420
+ # value=False,
421
+ # info="启用长篇内容生成模式"
422
+ # )
423
 
424
  # Voice Settings
425
  gr.Markdown(
 
470
  info="一些额外的指令,用来帮助AI更好地理解你想要聊天的内容和方向"
471
  )
472
 
473
+ # api_key_label = gr.Textbox(
474
+ # label="自定义基于云的 LLM",
475
+ # value="GEMINI_API_KEY",
476
+ # info="可选,默认使用 Gemini,如使用 OPENAI,上面填入 'OPENAI_API_KEY' 并保证设置好环境变量且设置好下面的模型"
477
+ # )
478
 
479
+ # llm_model_name = gr.Textbox(
480
+ # label="设置好对应自定义基于云的 LLM 模型",
481
+ # value="gemini-1.5-pro-latest",
482
+ # info="可选,配合上面的参数,默认是 Gemini 的 gemini-1.5-pro-latest,默认 OPENAI 可支持模型 api.168369.xyz/v1/models 获取"
483
+ # )
484
 
485
  # Output Section
486
  gr.Markdown(
 
510
  dialogue_structure, podcast_name,
511
  podcast_tagline, output_language, tts_model,
512
  creativity_level, user_instructions,
 
513
  engagement_techniques, tts_openai_question, tts_openai_answer, ending_message,
514
  ],
515
  outputs=audio_output