jitubutwal1441 commited on
Commit
5d80bfb
·
1 Parent(s): c22d94a

Use Nepali song generation prompt and different text3speech api

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -36,8 +36,9 @@ def image_to_text(url, use_api=True):
36
  # LLM
37
  def generate_story(story_idea):
38
  template = """
39
- You are a professional story teller;
40
- Generate a short story based on a simple narrative, the story should be no more than 50 words;
 
41
  CONTEXT: {story_idea}
42
  STORY:
43
  """
@@ -49,7 +50,7 @@ def generate_story(story_idea):
49
 
50
  # text to speech
51
  def text_to_speech(story):
52
- API_URL = "https://api-inference.huggingface.co/models/espnet/kan-bayashi_ljspeech_vits"
53
  headers = {"Authorization": f"Bearer {HUGGINGFACEHUB_API_TOKEN}"}
54
 
55
  payloads = {
 
36
  # LLM
37
  def generate_story(story_idea):
38
  template = """
39
+ You are a professional song writter;
40
+ Generate a song based on a simple narrative, the song should be no more than 100 words.
41
+ Song should be in Nepali language
42
  CONTEXT: {story_idea}
43
  STORY:
44
  """
 
50
 
51
  # text to speech
52
  def text_to_speech(story):
53
+ API_URL = "https://api-inference.huggingface.co/models/openai/whisper-large-v2"
54
  headers = {"Authorization": f"Bearer {HUGGINGFACEHUB_API_TOKEN}"}
55
 
56
  payloads = {