mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-09 02:00:44 +08:00
8e24d5d646
* Add step to deploy to spaces on release * Import package not modules * Lint * Hacky solution * Add app file * Github actions script * Fix bucket url * Update versioning * Fic typo in script * Change path * Fix quote * Clean up action * Fix keys * Formatting + comment * Fix all_demo creation * lint ui * Get latest pypi version and use only 20 demos * Test version change works correctly * Fix gradio version * Fix typo * Use github sha to rebuild on every commit * Get sha the proper way * Change where env is accessed * Fix typo in cp * Undo changes to version.txt * Add matrix transpose
19 lines
329 B
Python
19 lines
329 B
Python
import gradio as gr
|
|
import random
|
|
|
|
sentence_list = [
|
|
"Good morning!",
|
|
"Prayers are with you, have a safe day!",
|
|
"I love you!"
|
|
]
|
|
|
|
|
|
def random_sentence():
|
|
return sentence_list[random.randint(0, 2)]
|
|
|
|
|
|
demo = gr.Interface(fn=random_sentence, inputs=None, outputs="text")
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|