Download app.py from nalinaksh/llms: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/nalinaksh/llms/resolve/main/app.py
- Command line
-
hf download hf://spaces/nalinaksh/llms/app.py
-
curl -L -o app.py https://huggingface.co/spaces/nalinaksh/llms/resolve/main/app.py
1.06 kB
| import gradio as gr | |
| #from QA_Pipeline import * | |
| from QA_Tensorflow import * | |
| question = "What is Pragyan?" | |
| context = "Chandrayaan-3 is the third and most recent lunar Indian Space Research exploration mission under the Chandrayaan programme of ISRO. It consists of a lander named Vikram and a rover named Pragyan similar to Chandrayaan-2. Its propulsion module behaves like a communication relay satellite." | |
| title = "Extractive question answering" | |
| description = """ | |
| <img src="https://www.zdnet.com/a/img/resize/1a8d2c93f1f51f9f33d21d7224840dfcf06f5a50/2023/02/14/328d5be2-918d-4aee-8690-875aed4a8c8a/gettyimages-1458045238-1.jpg?auto=webp&width=1280" width=200px> | |
| """ | |
| question_box = gr.Textbox(label="Question:", placeholder="What is Pragyan?", lines=2) | |
| context_box = gr.Textbox(label="Context", placeholder=context, lines=10) | |
| demo = gr.Interface(fn=question_answering_tf, | |
| inputs=[question_box, context_box], | |
| outputs="text", | |
| title=title, | |
| description=description) | |
| demo.launch() |