deepakchawla-cb commited on
Commit
165f08c
·
1 Parent(s): f2b0df2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -43,18 +43,12 @@ def get_cancer_heading(data):
43
 
44
 
45
  def process_article_content(content):
46
- heading_1 = get_diabetic_heading(content)
47
- heading_2 = get_cancer_heading(content)
48
-
49
 
50
-
51
- # words = len(content.split())
52
- # characters = len(content)
53
- return heading_1, heading_2
54
 
55
  # Streamlit app
56
  def main():
57
- st.title("Article Content Processor")
58
 
59
  # Input field for article content
60
  article_content = st.text_area("Enter Article Content:", "")
@@ -63,12 +57,12 @@ def main():
63
  if st.button("Process"):
64
  # Process the article content
65
  if article_content:
66
- word_count, char_count = process_article_content(article_content)
67
 
68
  # Display the output
69
  st.subheader("Processed Output:")
70
- st.write(f"Word Count: {word_count}")
71
- st.write(f"Character Count: {char_count}")
72
 
73
  if __name__ == "__main__":
74
  main()
 
43
 
44
 
45
  def process_article_content(content):
 
 
 
46
 
47
+ return get_diabetic_heading(content), get_cancer_heading(content)
 
 
 
48
 
49
  # Streamlit app
50
  def main():
51
+ st.title("Health Day Demo")
52
 
53
  # Input field for article content
54
  article_content = st.text_area("Enter Article Content:", "")
 
57
  if st.button("Process"):
58
  # Process the article content
59
  if article_content:
60
+ diabetic_user, cancer_user = process_article_content(article_content)
61
 
62
  # Display the output
63
  st.subheader("Processed Output:")
64
+ st.write(f"Heading for Diabetic users: {diabetic_user}")
65
+ st.write(f"Heading for Cancer users: {cancer_user}")
66
 
67
  if __name__ == "__main__":
68
  main()