Moibe commited on
Commit
c95ae24
·
1 Parent(s): 9da0de8

Output markdown twice

Browse files
Files changed (1) hide show
  1. app.py +15 -21
app.py CHANGED
@@ -84,16 +84,24 @@ def perform(input1, input2):
84
 
85
  return "Desde funcion", path, info_window, btn_buy
86
 
 
 
 
 
 
 
 
87
 
88
- # print("Estoy en las declaraciones...")
 
 
89
  # gr.State.usuario = "briggsboardman"
90
- # #Capsule es el usuario encriptado que enviarás a la API de Sulku.
91
  # capsule = encrypter.encripta(gr.State.usuario).decode("utf-8") #decode es para quitarle el 'b
92
  # gr.State.capsule = capsule
93
  # gr.State.tokens = 20
94
 
95
  #Headers
96
- nueva_label = gr.Label("Credits")
97
 
98
 
99
  #Inputs
@@ -106,20 +114,6 @@ lbl_msg = gr.Label("AI Engine ready...")
106
  btn_buy = gr.Button("Buy More", visible=False, size='lg')
107
 
108
  textbox = gr.Textbox(label="Console", value="Nuevo textbox", interactive=False)
109
- texto_del_markdown = """
110
- # Hello World! {variable}
111
- Start typing below to see the output.
112
- """
113
-
114
- def cambio():
115
-
116
- print("Ejecutando change...")
117
-
118
- nuevo_markdown = """
119
-
120
- """
121
-
122
- return nuevo_markdown
123
 
124
  #Gradio themes:
125
  # — gr.themes.Base()
@@ -132,13 +126,13 @@ with gr.Blocks(css="footer {visibility: hidden}", theme=gr.themes.Base()) as mai
132
 
133
  with gr.Row():
134
 
135
- mrk_title = gr.Markdown(texto_del_markdown)
136
- mrk_title = gr.Markdown(texto_del_markdown)
137
- nueva_label
138
 
139
 
140
  #lbl_msg.change(fn=cambio, lbl_msg)
141
- btn_buy.click(fn=cambio, outputs=mrk_title)
142
 
143
  with gr.Row():
144
 
 
84
 
85
  return "Desde funcion", path, info_window, btn_buy
86
 
87
+ def cambio():
88
+
89
+ print("Ejecutando change...")
90
+
91
+ nuevo_markdown = """
92
+
93
+ """
94
 
95
+ return nuevo_markdown
96
+
97
+ #LOCAL VARIABLES
98
  # gr.State.usuario = "briggsboardman"
99
+ # Capsule es el usuario encriptado que enviarás a la API de Sulku.
100
  # capsule = encrypter.encripta(gr.State.usuario).decode("utf-8") #decode es para quitarle el 'b
101
  # gr.State.capsule = capsule
102
  # gr.State.tokens = 20
103
 
104
  #Headers
 
105
 
106
 
107
  #Inputs
 
114
  btn_buy = gr.Button("Buy More", visible=False, size='lg')
115
 
116
  textbox = gr.Textbox(label="Console", value="Nuevo textbox", interactive=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
  #Gradio themes:
119
  # — gr.themes.Base()
 
126
 
127
  with gr.Row():
128
 
129
+ mrk_title = gr.Markdown("Hello")
130
+ mrk_title = gr.Markdown("Goodbye")
131
+ nueva_label = gr.Label("Credits")
132
 
133
 
134
  #lbl_msg.change(fn=cambio, lbl_msg)
135
+ btn_buy.click(fn=cambio, outputs=[mrk_title, mrk_title])
136
 
137
  with gr.Row():
138