Hemanth-thunder commited on
Commit
4c5a059
·
verified ·
1 Parent(s): 8d720be

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -4
src/streamlit_app.py CHANGED
@@ -1,11 +1,10 @@
1
  import streamlit as st
2
  from tamil_lemmatizer import TamilLemmatizer
 
3
 
4
  # Title and description for Hugging Face Spaces
5
  st.set_page_config(page_title="Tamil Lemmatizer", page_icon="🎯")
6
 
7
- import re
8
-
9
  def clean_word(word):
10
  # Remove all punctuation except Tamil characters
11
  return re.sub(r"[^\w\u0B80-\u0BFF]", "", word)
@@ -78,8 +77,11 @@ def main():
78
  st.header("Contextual Lemma Finder")
79
  st.write("Find all occurrences of a word's lemma in a paragraph.")
80
 
81
- paragraph = st.text_area("Enter Tamil Paragraph", height=150)
82
- search_word = st.text_input("Word to Search (lemma-based)")
 
 
 
83
 
84
  if st.button("Find Lemma"):
85
  if paragraph and search_word:
 
1
  import streamlit as st
2
  from tamil_lemmatizer import TamilLemmatizer
3
+ import re
4
 
5
  # Title and description for Hugging Face Spaces
6
  st.set_page_config(page_title="Tamil Lemmatizer", page_icon="🎯")
7
 
 
 
8
  def clean_word(word):
9
  # Remove all punctuation except Tamil characters
10
  return re.sub(r"[^\w\u0B80-\u0BFF]", "", word)
 
77
  st.header("Contextual Lemma Finder")
78
  st.write("Find all occurrences of a word's lemma in a paragraph.")
79
 
80
+ default_paragraph = "அவர்கள் நேற்று சந்தித்தபோது பேசிக்கொண்டிருந்த நிகழ்வுகளை இன்று அவர் நண்பர்களிடம் பேசுகிறார். குழந்தைகள் அந்த விஷயத்தைப் பற்றி ஒன்றோ இரண்டோ வரிகளாக பேசுகின்றனர், மேலும் பெரியவர்கள் அதை விவாதிப்பதாக பேசுகிறார்கள். சில முக்கியமான தகவல்களை ஆசிரியர் அனைவருக்கும் பேசுகிறது என்று மாணவர்கள் நினைக்கிறார்கள்."
81
+ default_search_word = "பேசினார்"
82
+
83
+ paragraph = st.text_area("Enter Tamil Paragraph", value=default_paragraph, height=150)
84
+ search_word = st.text_input("Word to Search (lemma-based)", value=default_search_word)
85
 
86
  if st.button("Find Lemma"):
87
  if paragraph and search_word: