Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,8 @@
|
|
1 |
import pandas as pd
|
2 |
import streamlit as st
|
3 |
-
from transformers import pipeline
|
4 |
from inference import inference
|
5 |
from inference import DebertaEvaluator
|
6 |
|
7 |
-
pipe = pipeline('sentiment-analysis')
|
8 |
-
text = st.text_area('enter some text: ')
|
9 |
-
|
10 |
st.title("Essay Scoring")
|
11 |
|
12 |
categories=['cohesion', 'syntax', 'vocabulary', 'phraseology', 'grammar', 'conventions']
|
@@ -18,6 +14,9 @@ text = "Here is a sample essay."
|
|
18 |
|
19 |
user_input = st.text_area("Enter your essay here:", value=text)
|
20 |
|
|
|
|
|
|
|
21 |
if st.button("Calculate Scores"):
|
22 |
scores = inference(user_input)
|
23 |
scores_df = pd.DataFrame([scores], index=['Score'])
|
|
|
1 |
import pandas as pd
|
2 |
import streamlit as st
|
|
|
3 |
from inference import inference
|
4 |
from inference import DebertaEvaluator
|
5 |
|
|
|
|
|
|
|
6 |
st.title("Essay Scoring")
|
7 |
|
8 |
categories=['cohesion', 'syntax', 'vocabulary', 'phraseology', 'grammar', 'conventions']
|
|
|
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'])
|