eswardivi commited on
Commit
ba70fc3
·
verified ·
1 Parent(s): f09cc7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -71,7 +71,19 @@ def synthesize(article_url,progress_audio=gr.Progress()):
71
  }
72
  """
73
  chat = []
74
- chat.append({"role": "user", "content": "{text} \n Convert the text as Elaborate Conversation between two people as Podcast.\nfollowing this template: \n {template}"})
 
 
 
 
 
 
 
 
 
 
 
 
75
  messages = tok.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
76
  model_inputs = tok([messages], return_tensors="pt").to(device)
77
  streamer = TextIteratorStreamer(
 
71
  }
72
  """
73
  chat = []
74
+ chat.append(
75
+ {
76
+ "role": "user",
77
+ "content": """{text} \n Convert the text as Elaborate Conversation between two people as Podcast.\nfollowing this template:
78
+ {
79
+ "conversation": [
80
+ {"speaker": "", "text": ""},
81
+ {"speaker": "", "text": ""}
82
+ ]
83
+ }""",
84
+ }
85
+ )
86
+
87
  messages = tok.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
88
  model_inputs = tok([messages], return_tensors="pt").to(device)
89
  streamer = TextIteratorStreamer(