kdevoe commited on
Commit
cb92ead
1 Parent(s): 21480f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
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
- if text:
10
- #out = pipe(text)
11
- out = inference(text)
 
 
 
 
 
 
 
 
 
 
 
 
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)