Update app.py
Browse files
app.py
CHANGED
|
@@ -10,13 +10,15 @@ categories=['cohesion', 'syntax', 'vocabulary', 'phraseology', 'grammar', 'conve
|
|
| 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 = [round(score * 2
|
| 20 |
new_table = {categories[i]: scores[i] for i in range(len(categories))}
|
| 21 |
scores_df = pd.DataFrame(new_table, index=['Score'])
|
| 22 |
|
|
|
|
| 10 |
initial_scores = {category: '-' for category in categories}
|
| 11 |
scores_df = pd.DataFrame(initial_scores, index=['Score'])
|
| 12 |
|
| 13 |
+
pd.set_option('display.precision', 1)
|
| 14 |
+
|
| 15 |
text = "Here is a sample essay."
|
| 16 |
|
| 17 |
user_input = st.text_area("Enter your essay here:", value=text)
|
| 18 |
|
| 19 |
if st.button("Calculate Scores"):
|
| 20 |
scores = inference(user_input)
|
| 21 |
+
scores = [round(score * 2) / 2 for score in scores[0]]
|
| 22 |
new_table = {categories[i]: scores[i] for i in range(len(categories))}
|
| 23 |
scores_df = pd.DataFrame(new_table, index=['Score'])
|
| 24 |
|