mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-07 11:46:51 +08:00
Restore Interpretation, Live, Auth, Queueing Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
19 lines
263 B
Python
19 lines
263 B
Python
import gradio as gr
|
|
|
|
|
|
def image_mod(text):
|
|
return text[::-1]
|
|
|
|
|
|
demo = gr.Blocks()
|
|
|
|
with demo:
|
|
text = gr.Textbox()
|
|
btn = gr.Button("Run")
|
|
btn.click(image_mod, text, text)
|
|
|
|
print(demo.get_config_file())
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|