Spaces:
Sleeping
Sleeping
phucpx
commited on
Commit
·
e495a4f
1
Parent(s):
6ea353f
Add application file
Browse files
app.py
CHANGED
@@ -33,6 +33,7 @@ weights_mapping = {
|
|
33 |
}
|
34 |
|
35 |
LIST_USER_LEVEL = ["beginner", "intermediate", "advanced"]
|
|
|
36 |
|
37 |
template_los = """0. Identify the challenges in Matching sentence endings: More endings than questions, Some endings may be grammatically correct but not connected to the main ideas in the text, Information for possible endings is placed randomly in the passage
|
38 |
1. Understand and apply the steps for answering Matching sentence endings questions effectively: Read and underline keywords in incomplete sentences and endings, Scan using keywords in incomplete sentences to locate the information area, and Match incomplete sentences with endings and compare to the information area"""
|
@@ -98,7 +99,7 @@ def generate_questions(model_name, user_level, num_questions, question_type, lan
|
|
98 |
iface = gr.Interface(
|
99 |
fn=generate_questions,
|
100 |
inputs=[
|
101 |
-
gr.Dropdown(
|
102 |
gr.Dropdown(LIST_USER_LEVEL, label="User Level", value=LIST_USER_LEVEL[0]),
|
103 |
gr.Number(value=5, label="Number of Questions"),
|
104 |
gr.Dropdown(["Short answer", "Single choice", "Multiple choice"], label="Question Type"),
|
|
|
33 |
}
|
34 |
|
35 |
LIST_USER_LEVEL = ["beginner", "intermediate", "advanced"]
|
36 |
+
LIST_MODELS = list(MODEL2SERVICE.keys())
|
37 |
|
38 |
template_los = """0. Identify the challenges in Matching sentence endings: More endings than questions, Some endings may be grammatically correct but not connected to the main ideas in the text, Information for possible endings is placed randomly in the passage
|
39 |
1. Understand and apply the steps for answering Matching sentence endings questions effectively: Read and underline keywords in incomplete sentences and endings, Scan using keywords in incomplete sentences to locate the information area, and Match incomplete sentences with endings and compare to the information area"""
|
|
|
99 |
iface = gr.Interface(
|
100 |
fn=generate_questions,
|
101 |
inputs=[
|
102 |
+
gr.Dropdown(LIST_MODELS, label="Model Usage", value=LIST_MODELS[0]),
|
103 |
gr.Dropdown(LIST_USER_LEVEL, label="User Level", value=LIST_USER_LEVEL[0]),
|
104 |
gr.Number(value=5, label="Number of Questions"),
|
105 |
gr.Dropdown(["Short answer", "Single choice", "Multiple choice"], label="Question Type"),
|