Spaces:
Sleeping
Sleeping
Commit ·
3720c80
1
Parent(s): c720e4f
new update
Browse files
app.py
CHANGED
|
@@ -47,9 +47,9 @@ def preprocess_text(input_text):
|
|
| 47 |
return input_features
|
| 48 |
|
| 49 |
# Function to generate test steps
|
| 50 |
-
def generate_test_steps(acceptance_criteria
|
| 51 |
# Preprocess the input text
|
| 52 |
-
input_features = preprocess_text(f"{acceptance_criteria}
|
| 53 |
|
| 54 |
# Generate prediction
|
| 55 |
predicted_steps = model.predict(input_features)
|
|
@@ -57,18 +57,17 @@ def generate_test_steps(acceptance_criteria, test_data):
|
|
| 57 |
|
| 58 |
# Streamlit App
|
| 59 |
st.title("Test Case Steps Generator")
|
| 60 |
-
st.write("This app generates test steps based on Test Case Acceptance Criteria
|
| 61 |
|
| 62 |
# Input section
|
| 63 |
-
acceptance_criteria = st.text_area("Enter Test Case Acceptance Criteria"
|
| 64 |
-
test_data = st.text_area("Enter Test Data", "")
|
| 65 |
|
| 66 |
# Generate Test Steps
|
| 67 |
if st.button("Generate Test Steps"):
|
| 68 |
-
if acceptance_criteria
|
| 69 |
if model:
|
| 70 |
# Call the function to generate predictions
|
| 71 |
-
test_steps = generate_test_steps(acceptance_criteria
|
| 72 |
|
| 73 |
# Display the results
|
| 74 |
st.subheader("Generated Test Steps")
|
|
@@ -76,4 +75,4 @@ if st.button("Generate Test Steps"):
|
|
| 76 |
else:
|
| 77 |
st.error("Model not loaded. Please check the model repository and file.")
|
| 78 |
else:
|
| 79 |
-
st.warning("Please fill
|
|
|
|
| 47 |
return input_features
|
| 48 |
|
| 49 |
# Function to generate test steps
|
| 50 |
+
def generate_test_steps(acceptance_criteria):
|
| 51 |
# Preprocess the input text
|
| 52 |
+
input_features = preprocess_text(f"{acceptance_criteria}")
|
| 53 |
|
| 54 |
# Generate prediction
|
| 55 |
predicted_steps = model.predict(input_features)
|
|
|
|
| 57 |
|
| 58 |
# Streamlit App
|
| 59 |
st.title("Test Case Steps Generator")
|
| 60 |
+
st.write("This app generates test steps based on Test Case Acceptance Criteria")
|
| 61 |
|
| 62 |
# Input section
|
| 63 |
+
acceptance_criteria = st.text_area("Enter Test Case Acceptance Criteria")
|
|
|
|
| 64 |
|
| 65 |
# Generate Test Steps
|
| 66 |
if st.button("Generate Test Steps"):
|
| 67 |
+
if acceptance_criteria:
|
| 68 |
if model:
|
| 69 |
# Call the function to generate predictions
|
| 70 |
+
test_steps = generate_test_steps(acceptance_criteria)
|
| 71 |
|
| 72 |
# Display the results
|
| 73 |
st.subheader("Generated Test Steps")
|
|
|
|
| 75 |
else:
|
| 76 |
st.error("Model not loaded. Please check the model repository and file.")
|
| 77 |
else:
|
| 78 |
+
st.warning("Please fill Acceptance Criteria")
|