openfree commited on
Commit
ed42088
·
verified ·
1 Parent(s): c25388b

Update bckp.py

Browse files
Files changed (1) hide show
  1. bckp.py +3 -20
bckp.py CHANGED
@@ -95,7 +95,7 @@ def synthesize(article_url,progress_audio=gr.Progress()):
95
  generate_kwargs = dict(
96
  model_inputs,
97
  streamer=streamer,
98
- max_new_tokens=1024,
99
  do_sample=True,
100
  temperature=0.9,
101
  eos_token_id=terminators,
@@ -146,18 +146,8 @@ def synthesize(article_url,progress_audio=gr.Progress()):
146
  return conversation, final_audio_path
147
 
148
 
149
- with gr.Blocks(theme='gstaff/sketch') as demo:
150
- gr.Markdown("# Turn Any Article into a Podcast")
151
- gr.Markdown("## Easily convert articles from URLs into listenable audio podcasts.")
152
- gr.Markdown("### Instructions")
153
- gr.Markdown("""
154
- - **Step 1:** Paste the URL of the article you want to convert into the textbox.
155
- - **Step 2:** Click on "Podcastify" to generate the podcast.
156
- - **Step 3:** Listen to the podcast or view the conversation.
157
- """)
158
- gr.Markdown("""
159
- - View the code at [GitHub - NarrateIt](https://github.com/EswarDivi/NarrateIt).
160
- """)
161
  with gr.Group():
162
  text = gr.Textbox(label="Article Link")
163
  btn = gr.Button("Podcastify", variant="primary")
@@ -165,12 +155,5 @@ with gr.Blocks(theme='gstaff/sketch') as demo:
165
  conv_display = gr.Textbox(label="Conversation", interactive=False)
166
  aud = gr.Audio(interactive=False)
167
  btn.click(synthesize, inputs=[text], outputs=[conv_display, aud])
168
- gr.Markdown("""
169
- Special thanks to:
170
 
171
- - [gstaff/sketch](https://huggingface.co/spaces/gstaff/sketch) for the Sketch Theme.
172
- - [mrfakename/MeloTTS](https://huggingface.co/spaces/mrfakename/MeloTTS) and [GitHub](https://github.com/myshell-ai/MeloTTS) for MeloTTS.
173
- - [Hermes-2-Pro-Llama-3-8B](https://huggingface.co/NousResearch/Hermes-2-Pro-Llama-3-8B) for Function Calling Support.
174
- - [Jina AI](https://jina.ai/reader/) for the web page parsing.
175
- """)
176
  demo.queue(api_open=True, default_concurrency_limit=10).launch(show_api=True,share=True)
 
95
  generate_kwargs = dict(
96
  model_inputs,
97
  streamer=streamer,
98
+ max_new_tokens=4000,
99
  do_sample=True,
100
  temperature=0.9,
101
  eos_token_id=terminators,
 
146
  return conversation, final_audio_path
147
 
148
 
149
+ with gr.Blocks(theme='soft') as demo:
150
+
 
 
 
 
 
 
 
 
 
 
151
  with gr.Group():
152
  text = gr.Textbox(label="Article Link")
153
  btn = gr.Button("Podcastify", variant="primary")
 
155
  conv_display = gr.Textbox(label="Conversation", interactive=False)
156
  aud = gr.Audio(interactive=False)
157
  btn.click(synthesize, inputs=[text], outputs=[conv_display, aud])
 
 
158
 
 
 
 
 
 
159
  demo.queue(api_open=True, default_concurrency_limit=10).launch(show_api=True,share=True)