Spaces:
Runtime error
Runtime error
File size: 639 Bytes
fd5da23 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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()
|