ysharma HF staff commited on
Commit
0e26b77
·
1 Parent(s): aa64400
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -77,6 +77,7 @@ def text2speech(text):
77
  return fastspeech(text)
78
 
79
  def engine(text_input):
 
80
  #Extract entities from text
81
  ner = gr.Interface.load("huggingface/flair/ner-english-ontonotes-large")
82
  entities = ner(text_input)
@@ -89,7 +90,8 @@ def engine(text_input):
89
  for ent in entities:
90
  img = gr.Interface.load("spaces/multimodalart/latentdiffusion")(ent[0],'50','256','256','1',10)[0]
91
  img_list.append(img)
92
-
 
93
  #Resizing all images produced to same size
94
  resize_img_list = resize(img_list)
95
 
@@ -98,6 +100,8 @@ def engine(text_input):
98
 
99
  #Calculate the desired frame per second based on given audio length and entities identified
100
  fps= entities_num / 19 #length of audio file #13 / 19
 
 
101
 
102
  #Convert string of images into a video
103
  #clip = images_to_video(fps, resize_img_list)
 
77
  return fastspeech(text)
78
 
79
  def engine(text_input):
80
+ print(" ** Inside Enngine **")
81
  #Extract entities from text
82
  ner = gr.Interface.load("huggingface/flair/ner-english-ontonotes-large")
83
  entities = ner(text_input)
 
90
  for ent in entities:
91
  img = gr.Interface.load("spaces/multimodalart/latentdiffusion")(ent[0],'50','256','256','1',10)[0]
92
  img_list.append(img)
93
+
94
+ print('img_list size:',len(img_list))
95
  #Resizing all images produced to same size
96
  resize_img_list = resize(img_list)
97
 
 
100
 
101
  #Calculate the desired frame per second based on given audio length and entities identified
102
  fps= entities_num / 19 #length of audio file #13 / 19
103
+ fps = format(fps, '.5f')
104
+ print('fps is: ',fps)
105
 
106
  #Convert string of images into a video
107
  #clip = images_to_video(fps, resize_img_list)