Christian Koch commited on
Commit
cc3c391
1 Parent(s): 8a6bb0b

fix missing import, some cleanup

Browse files
Files changed (2) hide show
  1. app.py +3 -9
  2. fill_in_summary.py +1 -0
app.py CHANGED
@@ -8,13 +8,13 @@ def paraphrase(text):
8
 
9
  st.title('Question Generator by Eddevs')
10
 
11
- select = st.selectbox('Type', ['Question Generator', 'Paraphrasing', 'Summarization', 'Fill in the gap'])
12
 
13
  if select == "Summarization":
14
  with st.form("summarization"):
15
  # left_column, right_column = st.columns(2)
16
  # left_column.selectbox('Type', ['Question Generator', 'Paraphrasing'])
17
- st.selectbox('Model', ['T5', 'GPT Neo-X'])
18
 
19
  input = st.text_area("Input Text")
20
 
@@ -24,12 +24,8 @@ if select == "Summarization":
24
  st.write(FillInSummary().summarize(input))
25
 
26
 
27
- if select == "Fill in the gap":
28
  with st.form("summarization"):
29
- # left_column, right_column = st.columns(2)
30
- # left_column.selectbox('Type', ['Question Generator', 'Paraphrasing'])
31
- st.selectbox('Model', ['T5', 'GPT Neo-X'])
32
-
33
  input = st.text_area("Input Text")
34
 
35
  submitted = st.form_submit_button("Generate")
@@ -42,8 +38,6 @@ if select == "Fill in the gap":
42
 
43
  if select == "Paraphrasing":
44
  with st.form("paraphrasing"):
45
- # left_column, right_column = st.columns(2)
46
- # left_column.selectbox('Type', ['Question Generator', 'Paraphrasing'])
47
  st.selectbox('Model', ['T5', 'GPT Neo-X'])
48
 
49
  input = st.text_area("Input Text")
 
8
 
9
  st.title('Question Generator by Eddevs')
10
 
11
+ select = st.selectbox('Type', ['Question Generator', 'Paraphrasing', 'Summarization', 'Fill in the blank'])
12
 
13
  if select == "Summarization":
14
  with st.form("summarization"):
15
  # left_column, right_column = st.columns(2)
16
  # left_column.selectbox('Type', ['Question Generator', 'Paraphrasing'])
17
+ #st.selectbox('Model', ['T5', 'GPT Neo-X'])
18
 
19
  input = st.text_area("Input Text")
20
 
 
24
  st.write(FillInSummary().summarize(input))
25
 
26
 
27
+ if select == "Fill in the blank":
28
  with st.form("summarization"):
 
 
 
 
29
  input = st.text_area("Input Text")
30
 
31
  submitted = st.form_submit_button("Generate")
 
38
 
39
  if select == "Paraphrasing":
40
  with st.form("paraphrasing"):
 
 
41
  st.selectbox('Model', ['T5', 'GPT Neo-X'])
42
 
43
  input = st.text_area("Input Text")
fill_in_summary.py CHANGED
@@ -1,3 +1,4 @@
 
1
 
2
  class FillInSummary:
3
  """Organizing Summarization and Subsequent Fill-In-Task."""
 
1
+ from transformers import pipeline
2
 
3
  class FillInSummary:
4
  """Organizing Summarization and Subsequent Fill-In-Task."""