Spaces:
Sleeping
Sleeping
primeira versao
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +30 -4
- model/model_tawos_aloy.pkl +3 -0
- requirements.txt +1 -0
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -1,8 +1,34 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
import pickle
|
3 |
|
4 |
+
from sklearn.feature_extraction.text import TfidfVectorizer
|
5 |
+
from sklearn.feature_selection import SelectKBest
|
6 |
+
from sklearn.feature_selection import f_classif
|
7 |
|
8 |
+
import pandas as pd
|
9 |
|
10 |
+
# CLONE - Studio Dashboard: "default" and "Default Project" does not give clear information about Alloy and Project unless description is read.
|
11 |
+
# Steps To Reproduce: 1. On dashboard on studio 3.0, navigate to Develop tab. 2. Notice "default" and "Default Project" & "two-tabbed" and "Tabbed Application" names. Actual: User does not get clear information from names that one is alloy project and another one is Titanium project unless he reads the description below. Expected: Naming convention or icon corresponding must suggest type
|
12 |
+
|
13 |
+
def calcula(titulo, descricao):
|
14 |
+
with open("model/model_tawos_aloy.pkl", "rb") as file:
|
15 |
+
model = pickle.load(file)
|
16 |
+
|
17 |
+
context = titulo + descricao
|
18 |
+
d = {"context": [context]}
|
19 |
+
df = pd.DataFrame(data=d, columns=["context"])
|
20 |
+
|
21 |
+
vectorizer = TfidfVectorizer()
|
22 |
+
X = vectorizer.fit_transform(df["context"])
|
23 |
+
|
24 |
+
#X_new = SelectKBest(f_classif, k=50).fit_transfor(X)
|
25 |
+
|
26 |
+
story_points = model.predict(X)
|
27 |
+
|
28 |
+
return story_points
|
29 |
+
|
30 |
+
gr.Interface(fn=calcula,
|
31 |
+
inputs=[gr.Textbox(placeholder="Título", label="Título"),
|
32 |
+
gr.Textbox(lines=10, placeholder="Descrição", label="Descrição")],
|
33 |
+
outputs=[gr.Textbox(label="Story Points Estimado")],
|
34 |
+
title="Agile Task Story Point Estimator").launch()
|
model/model_tawos_aloy.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eec214d79758da785f259815f1e4f9576f75b574f4d2173d703eb7f856c207d3
|
3 |
+
size 4451
|
requirements.txt
CHANGED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
scikit-learn
|