Spaces:
Running
on
A10G
Running
on
A10G
write a web app in python and flask and bootstrap. | |
The UI: | |
- input textbox named "InputTextbox" on top | |
- "Generate All" button named GenerateAllButton at the same row as input textbox 1 | |
- a button "Text -> Script" called TextToScriptButton | |
- A big textbox named "ScriptTextbox". The textbox should be set to wrap-word mode | |
- A split line | |
- a button "Script -> HAML" called ScriptToHAMLButton | |
- A big textbox named "HAMLTextbox". The textbox should be set to wrap-word mode and display text with HTML syntax format. | |
- A split line | |
- a button "HAML -> Python Code" called HAMLToPythonCodeButton | |
- A big textbox named "PythonCodeTextbox". The textbox should be set to wrap-word mode and display text with python syntax format. | |
Behaviors: | |
- When the user click TextToScriptButton, it will call ChatGPT API, which concat a prompt which is red from "prompts/text_to_audio_script.prompt" with the content from InputTextbox, and send it to ChatGPT, and output ChatGPT's response to ScriptTextbox. | |
- When the user click ScriptToHAMLButton, it will call ChatGPT API, which concat a prompt which is red from "prompts/audio_script_to_HAML.prompt" with the content from ScriptTextbox, and send it to ChatGPT, and output ChatGPT's response to HAMLTextbox. | |
- When the user click HAMLToPythonCodeButton, it will get the content of HAMLTextbox and pipe the content to the python script convert_haml_to_py_code.py, and return the script's output to PythonCodeTextbox. | |