Spaces:
Runtime error
Runtime error
Download app.py from krushna/Physics_text_book: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/spaces/krushna/Physics_text_book/resolve/main/app.py
- Command line
-
hf download hf://spaces/krushna/Physics_text_book/app.py
-
curl -L -o app.py https://huggingface.co/spaces/krushna/Physics_text_book/resolve/main/app.py
317 Bytes
| from fastai.text.all import * | |
| import gradio as gr | |
| learn = load_learner('physicscolab_fit.pth') | |
| def predict(text, number_of_words,temperature): return learn.predict(text, n_words=int(number_of_words), temperature=temperature) | |
| intr = gr.Interface(predict, ["text","number", gr.Slider(0.1, 1,0.5)], "text") | |
| intr.launch() |