File size: 674 Bytes
cb92ead c99aec6 78497a7 1965f20 c99aec6 cb92ead 1d7aaad cb92ead feba2cc cb92ead 1d7aaad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import pandas as pd
import streamlit as st
from inference import inference
from inference import DebertaEvaluator
st.title("Essay Scoring")
categories=['cohesion', 'syntax', 'vocabulary', 'phraseology', 'grammar', 'conventions']
initial_scores = {category: '-' for category in categories}
scores_df = pd.DataFrame(initial_scores, index=['Score'])
text = "Here is a sample essay."
user_input = st.text_area("Enter your essay here:", value=text)
if st.button("Calculate Scores"):
scores = inference(user_input)
scores_df = pd.DataFrame([scores], index=['Score'])
st.table(scores_df)
st.write(out)
# Display the initial scores table
st.table(scores_df)
|