Some message changes
Browse files
app.py
CHANGED
@@ -60,7 +60,10 @@ def set_model(history, model):
|
|
60 |
|
61 |
def get_first_message(history):
|
62 |
history = [(None,
|
63 |
-
'Hi!! I AM GRADY!! I am a grading assistant to help you grade assignments based on a rubric!!
|
|
|
|
|
|
|
64 |
return history
|
65 |
|
66 |
|
@@ -68,7 +71,7 @@ def bot(history):
|
|
68 |
return history
|
69 |
|
70 |
with gr.Blocks() as demo:
|
71 |
-
gr.HTML("<h1 style='text-align: center;color: darkblue'>Grady -
|
72 |
chatbot = gr.Chatbot(get_first_message([]), elem_id="chatbot", interactive=True).style(height=600)
|
73 |
|
74 |
with gr.Row():
|
@@ -77,7 +80,7 @@ with gr.Blocks() as demo:
|
|
77 |
with gr.Row():
|
78 |
with gr.Column(scale=0.75):
|
79 |
txt = gr.Textbox(
|
80 |
-
label="
|
81 |
placeholder="Enter text and press enter", lines=1, interactive=True
|
82 |
).style(container=False)
|
83 |
|
|
|
60 |
|
61 |
def get_first_message(history):
|
62 |
history = [(None,
|
63 |
+
'''Hi!! I AM GRADY!! I am a grading assistant to help you grade assignments based on a rubric!! <br>
|
64 |
+
Today, I will be grading <a href="https://hbsp.harvard.edu/product/908D01-PDF-ENG"> Paediatric Orthopaedic Quiz. </a> <br>
|
65 |
+
Use the format as given in the example below to get an accurate grade. <br>
|
66 |
+
WARNING! I might get things wrong, so double check before your final grading. All the best. ''')]
|
67 |
return history
|
68 |
|
69 |
|
|
|
71 |
return history
|
72 |
|
73 |
with gr.Blocks() as demo:
|
74 |
+
gr.HTML("<h1 style='text-align: center;color: darkblue'>Grady - Your helpful Grading Assistant</h1>")
|
75 |
chatbot = gr.Chatbot(get_first_message([]), elem_id="chatbot", interactive=True).style(height=600)
|
76 |
|
77 |
with gr.Row():
|
|
|
80 |
with gr.Row():
|
81 |
with gr.Column(scale=0.75):
|
82 |
txt = gr.Textbox(
|
83 |
+
label="Student Response",
|
84 |
placeholder="Enter text and press enter", lines=1, interactive=True
|
85 |
).style(container=False)
|
86 |
|
utils.py
CHANGED
@@ -39,7 +39,7 @@ memory = ConversationBufferWindowMemory(memory_key="chat_history", k=10)
|
|
39 |
|
40 |
vectorstore_index = None
|
41 |
|
42 |
-
system_template = """You are "Grady", a VERY LINIENT GRADER! You use the grading rubric template to grade answers given by students on the course material which you have access to in the vectorstore but you STRICTLY FOLLOW THE GRADING TEMPLATE while generating response.
|
43 |
You should be VERY LINIENT while giving marks and give the benefit of the doubt to the student even if there is something not stated as clearly as expected. Even if something is mentioned indirectly or remotely close to the solution, give FULL score.
|
44 |
Especially, when Solution is given but Reasoning is not accurate, give FULL score.
|
45 |
You have a strong personality and are firm in tone while replying like a tightly wound up person. You should always be loud and the center of attraction in the room.
|
|
|
39 |
|
40 |
vectorstore_index = None
|
41 |
|
42 |
+
system_template = """You are "Grady, a helpful grading assistant", a VERY LINIENT GRADER! You use the grading rubric template to grade answers given by students on the course material which you have access to in the vectorstore but you STRICTLY FOLLOW THE GRADING TEMPLATE while generating response.
|
43 |
You should be VERY LINIENT while giving marks and give the benefit of the doubt to the student even if there is something not stated as clearly as expected. Even if something is mentioned indirectly or remotely close to the solution, give FULL score.
|
44 |
Especially, when Solution is given but Reasoning is not accurate, give FULL score.
|
45 |
You have a strong personality and are firm in tone while replying like a tightly wound up person. You should always be loud and the center of attraction in the room.
|