mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
73e98ddf15
* add required param but None * import torch req, add chunk_length_s import torch requirement for transformers enable inference for longer audio files * fix compononte initialization * input number is float, force int to multipy string * no need for Templates, fix class init * expects array * add requirements.txt for demo * update with cleaner syntax * add sample csv to fraud demo * adapt to new syntax * temp fix for Slider arguments * add dep to requirements * remove gr.Markdown from Interface init * fix default value param name * upgrade deepspeech, download models onstart * use path resolution consistent with other demos * remove redundant demo * add example to interface * fixed plotting issues * plots * deprecated carousel Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
14 lines
267 B
Python
14 lines
267 B
Python
import gradio as gr
|
|
|
|
|
|
def greet(name: str, repeat: float):
|
|
return "Hello " + name * int(repeat) + "!!"
|
|
|
|
|
|
demo = gr.Interface(
|
|
fn=greet, inputs=[gr.Textbox(lines=2, max_lines=4), gr.Number()], outputs="textarea"
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|