gradio/demo/live_with_vars/run.py
Freddy Boulton 8e24d5d646
Deploy All Demos to Spaces on PRs (#2012)
* 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
2022-08-16 12:07:20 -04:00

10 lines
234 B
Python

import gradio as gr
demo = gr.Interface(
lambda x, y: (x + y if y is not None else x, x + y if y is not None else x),
["textbox", "state"],
["textbox", "state"], live=True)
if __name__ == "__main__":
demo.launch()