Download app.py from mogulmint/tracker: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/spaces/mogulmint/tracker/resolve/main/app.py
- Command line
-
hf download hf://spaces/mogulmint/tracker/app.py
-
curl -L -o app.py https://huggingface.co/spaces/mogulmint/tracker/resolve/main/app.py
466 Bytes
| import gradio as gr | |
| import pickle | |
| model = pickle.load(open("model.pkl", "rb")) | |
| vectorizer = pickle.load(open("vectorizer.pkl", "rb")) | |
| def greet(description): | |
| new_query = description | |
| new_issue_vector = vectorizer.transform([new_query]) | |
| prediction = model.predict(new_issue_vector) | |
| return str(prediction[0]) | |
| iface = gr.Interface(fn=greet, inputs="text", outputs="label",title="Farming Tracker") | |
| # gr.Interface.queue(api_open=True,self) | |
| iface.launch(share=True) | |