Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
from inference import inference
|
@@ -6,7 +7,19 @@ from inference import DebertaEvaluator
|
|
6 |
pipe = pipeline('sentiment-analysis')
|
7 |
text = st.text_area('enter some text: ')
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
st.write(out)
|
|
|
1 |
+
import pandas as pd
|
2 |
import streamlit as st
|
3 |
from transformers import pipeline
|
4 |
from inference import inference
|
|
|
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']
|
13 |
+
|
14 |
+
initial_scores = {category: '-' for category in categories}
|
15 |
+
scores_df = pd.DataFrame(initial_scores, index=[0])
|
16 |
+
|
17 |
+
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 |
+
out = inference(user_input)
|
23 |
+
scores_df = pd.DataFrame([scores], index=['Score'])
|
24 |
+
st.table(scored_df)
|
25 |
st.write(out)
|