katsukiai commited on
Commit
223c33f
·
verified ·
1 Parent(s): 19dd066

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ meaning_generator = pipeline("text2text-generation", model="google/flan-t5-large
42
  dataset_dir = "dataset"
43
  os.makedirs(dataset_dir, exist_ok=True)
44
  csv_file = os.path.join(dataset_dir, "deepfocus_data.csv")
45
- parquet_file = os.path.join(dataset_dir, "deepfocus_data.parquet")
46
 
47
  def process_text_to_csv(input_text):
48
  try:
@@ -58,7 +58,7 @@ def process_text_to_csv(input_text):
58
  continue
59
 
60
  meanings = [syn.definition() for syn in wordnet.synsets(word)[:3]] or \
61
- [meaning_generator(f"Define the word '{word}'", max_length=100)[0]['generated_text']]
62
 
63
  data.append({"words": word, "meaning": meanings})
64
 
 
42
  dataset_dir = "dataset"
43
  os.makedirs(dataset_dir, exist_ok=True)
44
  csv_file = os.path.join(dataset_dir, "deepfocus_data.csv")
45
+ parquet_file = os.path.join(dataset_dir, "deepfocus_dataparquet")
46
 
47
  def process_text_to_csv(input_text):
48
  try:
 
58
  continue
59
 
60
  meanings = [syn.definition() for syn in wordnet.synsets(word)[:3]] or \
61
+ [meaning_generator(f"Define the word '{word}' and usage", max_length=1000)[0]['generated_text']]
62
 
63
  data.append({"words": word, "meaning": meanings})
64