Download app.py from jaimin/GPT: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/spaces/jaimin/GPT/resolve/main/app.py
- Command line
-
hf download hf://spaces/jaimin/GPT/app.py
-
curl -L -o app.py https://huggingface.co/spaces/jaimin/GPT/resolve/main/app.py
666 Bytes
| import gradio as gr | |
| from gradio.mix import Parallel | |
| import time | |
| from src.utils import paraphrase_english, paraphrase_indonesian | |
| from src.st_style import apply_prod_style | |
| def paraphrase(text): | |
| input_text = text.replace("\n\n", "\n").replace("\n", " ").strip() | |
| paraphrased = paraphrase_english(input_text) | |
| return paraphrased | |
| demo = gr.Interface(paraphrase, inputs=[gr.inputs.Textbox(label="Text", optional=False)], | |
| outputs=[gr.outputs.Textbox(label="Paraphrase")]) | |
| if __name__ == "__main__": | |
| demo.launch() |