Update app.py
Browse files
app.py
CHANGED
|
@@ -8,17 +8,18 @@ st.title("Essay Scoring")
|
|
| 8 |
categories=['cohesion', 'syntax', 'vocabulary', 'phraseology', 'grammar', 'conventions']
|
| 9 |
|
| 10 |
initial_scores = {category: '-' for category in categories}
|
| 11 |
-
scores_df = pd.DataFrame(initial_scores, index=[
|
| 12 |
|
| 13 |
text = "Here is a sample essay."
|
| 14 |
|
| 15 |
user_input = st.text_area("Enter your essay here:", value=text)
|
| 16 |
|
| 17 |
-
# Display the initial scores table
|
| 18 |
-
st.table(scores_df)
|
| 19 |
-
|
| 20 |
if st.button("Calculate Scores"):
|
| 21 |
scores = inference(user_input)
|
| 22 |
scores_df = pd.DataFrame([scores], index=['Score'])
|
| 23 |
-
st.table(
|
| 24 |
-
st.write(out)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
categories=['cohesion', 'syntax', 'vocabulary', 'phraseology', 'grammar', 'conventions']
|
| 9 |
|
| 10 |
initial_scores = {category: '-' for category in categories}
|
| 11 |
+
scores_df = pd.DataFrame(initial_scores, index=['Score'])
|
| 12 |
|
| 13 |
text = "Here is a sample essay."
|
| 14 |
|
| 15 |
user_input = st.text_area("Enter your essay here:", value=text)
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
if st.button("Calculate Scores"):
|
| 18 |
scores = inference(user_input)
|
| 19 |
scores_df = pd.DataFrame([scores], index=['Score'])
|
| 20 |
+
st.table(scores_df)
|
| 21 |
+
st.write(out)
|
| 22 |
+
|
| 23 |
+
# Display the initial scores table
|
| 24 |
+
st.table(scores_df)
|
| 25 |
+
|