AVAIYA commited on
Commit
a94690c
1 Parent(s): 545c700

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -30
app.py CHANGED
@@ -42,36 +42,7 @@ if len(text_input) != 0:
42
 
43
  st.markdown(f"my input is : { result_0 }")
44
  # time.sleep(100)
45
- if len(result_0) == 0:
46
- desc_1 = ['لا يوجد نتائج للخبر ']
47
- link_1 = ['لا يوجد مصدر']
48
- """
49
- if len(result_0) != 0:
50
- desc_1 = googlenews.get_texts()
51
- link_1 = googlenews.get_links()
52
- for i in list(range(2, 70)):
53
-
54
- result = googlenews.page_at(i)
55
- desc = googlenews.get_texts()
56
- link = googlenews.get_links()
57
-
58
- desc_1 = desc_1 + desc
59
- link_1 = link_1 + link
60
-
61
- column_names = ["text", 'link']
62
- df = pd.DataFrame(columns = column_names)
63
-
64
- df['text'] = desc_1
65
- df['link'] = link_1
66
-
67
- for letter in '#.][!XR':
68
- df['text'] = df['text'].astype(str).str.replace(letter,'')
69
- inputt[0] = inputt[0].astype(str).str.replace(letter,'')
70
-
71
- arabic_punctuations = '''`÷×؛<>_()*&^%][ـ،/:"؟.,'{}~¦+|!”…“–ـ'''
72
- english_punctuations = string.punctuation
73
- punctuations_list = arabic_punctuations + english_punctuations
74
- """
75
  def remove_punctuations(text):
76
  translator = str.maketrans('', '', punctuations_list)
77
  return text.translate(translator)
 
42
 
43
  st.markdown(f"my input is : { result_0 }")
44
  # time.sleep(100)
45
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  def remove_punctuations(text):
47
  translator = str.maketrans('', '', punctuations_list)
48
  return text.translate(translator)