Lisibonny commited on
Commit
a9dedd2
1 Parent(s): 6c38cb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -33,15 +33,6 @@ def paginar_frame(df):
33
  st.markdown(f"**{row['titulo'].strip()}**")
34
  st.markdown(f"{row['resumen'].strip()}")
35
  st.markdown(f"{row['link']}")
36
-
37
- def crear_indice():
38
- df=cargar_articulos()
39
- vocab = limpieza_articulos(df)
40
-
41
- td_matrix=term_document_matrix(df, vocab, 'ID', 'titulo')
42
- td_idf_matrix=tf_idf_score(td_matrix, df.ID.values)
43
-
44
- td_idf_matrix.to_csv('articulos_indexados.csv')
45
 
46
  def load_qa_model():
47
 
@@ -52,7 +43,7 @@ def load_qa_model():
52
  # 4. Use streamlit to create a web app
53
  def main():
54
 
55
- #crear_indice()
56
 
57
  st.set_page_config(page_title="Buscador de noticias periodicos dominicanos", page_icon="📰", layout="centered")
58
  st.image('repartidor_periodicos.jpeg', width=150)
@@ -76,6 +67,11 @@ def main():
76
  - [Remolacha.net](https://www.remolacha.net/)
77
  - [AlMomento.net](https://almomento.net/)
78
  - [Gente Tuya](http://www.gentetuya.com)
 
 
 
 
 
79
  """
80
  )
81
 
@@ -114,7 +110,7 @@ def main():
114
  """
115
  )
116
 
117
- df=cargar_articulos()
118
  articulos_indexados = pd.read_csv('articulos_indexados.csv')
119
  articulos_indexados = articulos_indexados.set_index('Unnamed: 0')
120
  tokenizer, qa_model = load_qa_model()
 
33
  st.markdown(f"**{row['titulo'].strip()}**")
34
  st.markdown(f"{row['resumen'].strip()}")
35
  st.markdown(f"{row['link']}")
 
 
 
 
 
 
 
 
 
36
 
37
  def load_qa_model():
38
 
 
43
  # 4. Use streamlit to create a web app
44
  def main():
45
 
46
+ df, fecha_min, fecha_max=cargar_articulos()
47
 
48
  st.set_page_config(page_title="Buscador de noticias periodicos dominicanos", page_icon="📰", layout="centered")
49
  st.image('repartidor_periodicos.jpeg', width=150)
 
67
  - [Remolacha.net](https://www.remolacha.net/)
68
  - [AlMomento.net](https://almomento.net/)
69
  - [Gente Tuya](http://www.gentetuya.com)
70
+
71
+ Rango:
72
+ - {fecha_min}
73
+ - {fecha_max}
74
+
75
  """
76
  )
77
 
 
110
  """
111
  )
112
 
113
+
114
  articulos_indexados = pd.read_csv('articulos_indexados.csv')
115
  articulos_indexados = articulos_indexados.set_index('Unnamed: 0')
116
  tokenizer, qa_model = load_qa_model()