coder160 commited on
Commit
876c835
·
1 Parent(s): 21f0079

update display info

Browse files
Files changed (1) hide show
  1. pages/3_Enlaces_URL.py +4 -5
pages/3_Enlaces_URL.py CHANGED
@@ -12,8 +12,6 @@ class Textia(Page):
12
  def build(self):
13
  self._init_globals()
14
  self.get_body().text("Traduce, Resume o Sintetiza tu información para una mejor comprensión.")
15
-
16
- self.get_body().success(f"¡Todo listo!\nhk-{self._get_hf()}")
17
  _url = self.get_body().text_input("URL")
18
  _traducir = self.get_body().checkbox('Traducir')
19
  _resumir = self.get_body().checkbox('Resumir')
@@ -28,12 +26,15 @@ class Textia(Page):
28
  if _traducir is True and _resumir is False:
29
  _response["traduccion"] = Generator.traducir(texto = _response.get('original'))
30
  _response["resumen"] = str()
 
31
  elif _traducir is False and _resumir is True:
32
  _response["traduccion"] = str()
33
  _response["resumen"] = Generator.resumir(texto = _response.get('original'))
 
34
  elif _traducir is True and _resumir is True:
35
  _response["traduccion"] = Generator.traducir(texto = _response.get('original'))
36
  _response["resumen"] = Generator.resumir(texto = _response.get('traduccion'))
 
37
  _printable.append(_response)
38
  _original=str()
39
  _traduccion=str()
@@ -50,6 +51,4 @@ class Textia(Page):
50
  self.get_body().markdown(_resumen, help="Resumen")
51
 
52
  if __name__ == "__main__":
53
- Textia(title="Textia - PDF",icon="🖼️").build()
54
-
55
-
 
12
  def build(self):
13
  self._init_globals()
14
  self.get_body().text("Traduce, Resume o Sintetiza tu información para una mejor comprensión.")
 
 
15
  _url = self.get_body().text_input("URL")
16
  _traducir = self.get_body().checkbox('Traducir')
17
  _resumir = self.get_body().checkbox('Resumir')
 
26
  if _traducir is True and _resumir is False:
27
  _response["traduccion"] = Generator.traducir(texto = _response.get('original'))
28
  _response["resumen"] = str()
29
+ self.get_body().markdown(_response.get('traduccion'), help="Resumen")
30
  elif _traducir is False and _resumir is True:
31
  _response["traduccion"] = str()
32
  _response["resumen"] = Generator.resumir(texto = _response.get('original'))
33
+ self.get_body().markdown(_response.get('resumen'), help="Resumen")
34
  elif _traducir is True and _resumir is True:
35
  _response["traduccion"] = Generator.traducir(texto = _response.get('original'))
36
  _response["resumen"] = Generator.resumir(texto = _response.get('traduccion'))
37
+ self.get_body().markdown(_response.get('resumen'), help="Resumen")
38
  _printable.append(_response)
39
  _original=str()
40
  _traduccion=str()
 
51
  self.get_body().markdown(_resumen, help="Resumen")
52
 
53
  if __name__ == "__main__":
54
+ Textia(title="Textia - PDF",icon="🖼️").build()