Spaces:
Runtime error
Runtime error
import gradio as gr | |
import file_manager | |
def update(text): | |
file_dir_path = 'test' | |
file_name = 'file.txt' | |
response_json = file_manager.push(text, file_dir_path, file_name) | |
# TODO: | |
# - call pygbag_build action | |
# - call pages-build-deployment action | |
return response_json | |
with gr.Blocks() as demo: | |
inp = gr.Textbox(placeholder="Enter Text Here") | |
out = gr.Textbox(placeholder="Result") | |
btn = gr.Button(value="Push") | |
btn.click(update, inputs=[inp], outputs=[out]) | |
gr.Markdown("""[Play the game!](https://pjavanrooyen.github.io/text-to-game/)""") | |
if __name__ == "__main__": | |
demo.launch() | |