Instructions to use Udyan/SimpleRegression with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Udyan/SimpleRegression with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Udyan/SimpleRegression", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
active_count = 0
|
| 4 |
+
|
| 5 |
+
def predict(input_data):
|
| 6 |
+
global active_count
|
| 7 |
+
active_count += 1
|
| 8 |
+
|
| 9 |
+
# dummy prediction
|
| 10 |
+
return f"Active Users (estimated): {active_count}"
|
| 11 |
+
|
| 12 |
+
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
| 13 |
+
iface.launch()
|