pragnakalp
commited on
Commit
•
20200de
1
Parent(s):
58eef77
Update app.py
Browse files
app.py
CHANGED
@@ -197,14 +197,38 @@ def one_shot(image,input_text,gender):
|
|
197 |
cmd='ffmpeg -i /content/audio_before.wav -filter:a "atempo=0.7" -vn /content/audio.wav'
|
198 |
os.system(cmd)
|
199 |
one_shot_talking(image,'audio.wav')
|
200 |
-
|
201 |
|
202 |
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
-
|
209 |
demo.launch(enable_queue = False)
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
cmd='ffmpeg -i /content/audio_before.wav -filter:a "atempo=0.7" -vn /content/audio.wav'
|
198 |
os.system(cmd)
|
199 |
one_shot_talking(image,'audio.wav')
|
|
|
200 |
|
201 |
|
202 |
+
def generate_ocr(method,image):
|
203 |
+
return "Hello"
|
204 |
+
"""
|
205 |
+
Create user interface for OCR demo
|
206 |
+
"""
|
207 |
+
|
208 |
+
image = gr.Image(shape=(300, 300))
|
209 |
+
method = gr.Radio(["PaddleOCR","EasyOCR", "KerasOCR"],value="PaddleOCR")
|
210 |
+
output = gr.Textbox(label="Output")
|
211 |
+
|
212 |
+
demo = gr.Interface(
|
213 |
+
generate_ocr,
|
214 |
+
[method,image],
|
215 |
+
output,
|
216 |
+
title="Optical Character Recognition",
|
217 |
+
css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;}",
|
218 |
+
article = """<p style='text-align: center;'>Feel free to give us your thoughts on this demo and please contact us at
|
219 |
+
<a href="mailto:letstalk@pragnakalp.com" target="_blank">letstalk@pragnakalp.com</a>
|
220 |
+
<p style='text-align: center;'>Developed by: <a href="https://www.pragnakalp.com" target="_blank">Pragnakalp Techlabs</a></p>"""
|
221 |
+
|
222 |
|
223 |
+
)
|
224 |
demo.launch(enable_queue = False)
|
225 |
|
226 |
+
|
227 |
+
# image = gr.Image(show_label=True, type="filepath",label="Input Image")
|
228 |
+
# input_text=gr.Textbox(lines=3, value="Hello How are you?", label="Input Text")
|
229 |
+
# gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
|
230 |
+
# output = gr.Video(show_label=True,label="Output")
|
231 |
+
|
232 |
+
# demo = gr.Interface(one_shot,[image,input_text,gender],[output],title="One Shot Talking Face from Text",)
|
233 |
+
# demo.launch(enable_queue = False)
|
234 |
+
|