m-ric HF Staff commited on
Commit
4d33cb7
·
1 Parent(s): 6b39085

Add prompts

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -39,15 +39,15 @@ Here is the topic: it's the top trending paper on Hugging Face daily papers toda
39
 
40
  {subject}
41
  The podcast should be an insightful discussion, with some amount of playful banter.
42
- Separate dialog as follows, using [S1] for the male host and [S2] for the female host, for instance:
43
  [S1] Hello, how are you?
44
  [S2] I'm good, thank you. How are you?
45
  [S1] I'm good, thank you.
46
  [S2] Great.
47
- Now go on, make 5 minutes of podcast.
48
  """
49
  response = client.chat_completion(
50
- [{"role": "user", "content": prompt}],
51
  max_tokens=8156,
52
  )
53
  return response.choices[0].message.content
@@ -143,7 +143,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
143
 
144
  with gr.Row():
145
  with gr.Column(scale=2):
146
- gr.Markdown(f"## Current Topic: {PODCAST_SUBJECT}")
147
  gr.Markdown(
148
  "This app generates a podcast discussion between two hosts about the specified topic."
149
  )
 
39
 
40
  {subject}
41
  The podcast should be an insightful discussion, with some amount of playful banter.
42
+ Separate dialog as follows, each replica in one line prefaced by the host number, [S1] for the male host and [S2] for the female host, for instance:
43
  [S1] Hello, how are you?
44
  [S2] I'm good, thank you. How are you?
45
  [S1] I'm good, thank you.
46
  [S2] Great.
47
+ The podcast should last around 5 minutes.
48
  """
49
  response = client.chat_completion(
50
+ [{"role": "user", "content": prompt[:1000]}],
51
  max_tokens=8156,
52
  )
53
  return response.choices[0].message.content
 
143
 
144
  with gr.Row():
145
  with gr.Column(scale=2):
146
+ # gr.Markdown(f"## Current Topic: {PODCAST_SUBJECT}")
147
  gr.Markdown(
148
  "This app generates a podcast discussion between two hosts about the specified topic."
149
  )