theekshana commited on
Commit
052ff21
β€’
1 Parent(s): c293aab
Files changed (3) hide show
  1. app.py +13 -4
  2. config.py +3 -3
  3. model.py +3 -3
app.py CHANGED
@@ -98,16 +98,19 @@ def side_bar():
98
  )
99
 
100
  summarizer_type = st.selectbox(
101
- "Summarizer Type for Long Text", options=["Map Reduce", "Refine"]
 
 
102
  )
103
 
104
  submitted = st.form_submit_button(
105
  "Save Parameters",
106
  # on_click=update_parameters_change
 
107
  )
108
 
109
- if submitted:
110
- parameters_change_button(model_name, summarizer_type)
111
 
112
 
113
  st.markdown("\n")
@@ -149,7 +152,13 @@ def side_bar():
149
  def load_app():
150
  st.title("Text Summarizer πŸ“")
151
 
152
- inp_text = st.text_input("Enter text or a url here")
 
 
 
 
 
 
153
  st.markdown(
154
  "<h4 style='text-align: center; color: green;'>OR</h4>",
155
  unsafe_allow_html=True,
 
98
  )
99
 
100
  summarizer_type = st.selectbox(
101
+ "Summarizer Type for Long Text",
102
+ # options=["Map Reduce", "Refine"]
103
+ options=["Map Reduce"]
104
  )
105
 
106
  submitted = st.form_submit_button(
107
  "Save Parameters",
108
  # on_click=update_parameters_change
109
+ disabled = True
110
  )
111
 
112
+ # if submitted:
113
+ # parameters_change_button(model_name, summarizer_type)
114
 
115
 
116
  st.markdown("\n")
 
152
  def load_app():
153
  st.title("Text Summarizer πŸ“")
154
 
155
+ # inp_text = st.text_input("Enter text or a url here")
156
+ # inp_text = st.text_input(
157
+ # "Enter text or a url here"
158
+ # )
159
+ inp_text = st.text_area(
160
+ "Enter text here"
161
+ )
162
  st.markdown(
163
  "<h4 style='text-align: center; color: green;'>OR</h4>",
164
  unsafe_allow_html=True,
config.py CHANGED
@@ -1,6 +1,6 @@
1
  MODELS = {
2
- "long-t5 v0":"IronOne-AI-Labs/long-t5-tglobal-16k-annual-reports-v0",
3
  "long-t5 v1":"IronOne-AI-Labs/long-t5-tglobal-16k-annual-reports-v1",
4
- "pegasus-x-large v1" : "IronOne-AI-Labs/pegasus-x-large-annual-report-QLoRA-fine-tuned-v1.1", #for tokenizer
5
- "openai" : "IronOne-AI-Labs/pegasus-x-large-annual-report-QLoRA-fine-tuned-v1.1"
6
  }
 
1
  MODELS = {
2
+ # "long-t5 v0":"IronOne-AI-Labs/long-t5-tglobal-16k-annual-reports-v0",
3
  "long-t5 v1":"IronOne-AI-Labs/long-t5-tglobal-16k-annual-reports-v1",
4
+ # "pegasus-x-large v1" : "IronOne-AI-Labs/pegasus-x-large-annual-report-QLoRA-fine-tuned-v1.1", #for tokenizer
5
+ # "openai" : "IronOne-AI-Labs/pegasus-x-large-annual-report-QLoRA-fine-tuned-v1.1"
6
  }
model.py CHANGED
@@ -8,9 +8,9 @@ import streamlit as st
8
  import torch
9
 
10
  load_dotenv()
11
- hf_token = os.environ.get("HF_TOKEN")
12
- # hf_token = st.secrets["HF_TOKEN"]
13
- login(token=hf_token)
14
  logger = getLogger(__name__)
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
 
 
8
  import torch
9
 
10
  load_dotenv()
11
+ # hf_token = os.environ.get("HF_TOKEN")
12
+ # # hf_token = st.secrets["HF_TOKEN"]
13
+ # login(token=hf_token)
14
  logger = getLogger(__name__)
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16