Spaces:
Sleeping
Sleeping
Updated app.py
Browse files
app.py
CHANGED
|
@@ -18,8 +18,8 @@ def predict_category(description:str)->str:
|
|
| 18 |
predict = LogisticModel.predict(X)[0]
|
| 19 |
return predict
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
fn=predict_category,
|
| 24 |
inputs=gr.Textbox(label="Enter Transaction Description"),
|
| 25 |
outputs=gr.Textbox(label="Predicted Category"),
|
|
@@ -27,4 +27,4 @@ if __name__ == "__main__":
|
|
| 27 |
description="Enter a transaction description to predict its category!"
|
| 28 |
)
|
| 29 |
|
| 30 |
-
|
|
|
|
| 18 |
predict = LogisticModel.predict(X)[0]
|
| 19 |
return predict
|
| 20 |
|
| 21 |
+
|
| 22 |
+
demo = gr.Interface(
|
| 23 |
fn=predict_category,
|
| 24 |
inputs=gr.Textbox(label="Enter Transaction Description"),
|
| 25 |
outputs=gr.Textbox(label="Predicted Category"),
|
|
|
|
| 27 |
description="Enter a transaction description to predict its category!"
|
| 28 |
)
|
| 29 |
|
| 30 |
+
demo.launch(share=True)
|