Spaces:
Sleeping
Sleeping
Update all changes
Browse files
app.py
CHANGED
@@ -6,6 +6,12 @@ from seminar_edition_ai import upload_file_ex, predictContemplando, predictProcl
|
|
6 |
|
7 |
HISTORY_ANSWER = ''
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
with gr.Blocks() as demo:
|
10 |
gr.Markdown("SermonLab AI Demo.")
|
11 |
with gr.Tab("Preparando mi Serm贸n"):
|
@@ -230,16 +236,25 @@ with gr.Blocks() as demo:
|
|
230 |
#Answer for Contemplando y Proclamando questions
|
231 |
|
232 |
|
233 |
-
text_output_guia = gr.Textbox(label="Respuesta", lines=10)
|
234 |
|
235 |
|
236 |
with gr.Column(scale = 1, min_width = 200):
|
237 |
text1 = gr.Textbox(visible = False)
|
238 |
#Button for calling AI Help
|
239 |
-
text_button = gr.Button("Buscar m谩s informaci贸n (IA)",
|
|
|
|
|
|
|
240 |
text2 = gr.Textbox(visible = False)
|
241 |
with gr.Column(scale = 2):
|
242 |
-
text_output_aiAnswer= gr.Textbox(label="Ayuda a mi respuesta", lines=10)
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
if __name__ == "__main__":
|
245 |
llmBuilder = GeminiLLM()
|
|
|
6 |
|
7 |
HISTORY_ANSWER = ''
|
8 |
|
9 |
+
def activeSermonGuideZone(buttonEvent):
|
10 |
+
print("Button show " + text_button.label)
|
11 |
+
return gr.Textbox.update(interactive = True), gr.Button.update(interactive = True), gr.Textbox.update(interactive = True)
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
with gr.Blocks() as demo:
|
16 |
gr.Markdown("SermonLab AI Demo.")
|
17 |
with gr.Tab("Preparando mi Serm贸n"):
|
|
|
236 |
#Answer for Contemplando y Proclamando questions
|
237 |
|
238 |
|
239 |
+
text_output_guia = gr.Textbox(label="Respuesta", lines = 10, interactive = False)
|
240 |
|
241 |
|
242 |
with gr.Column(scale = 1, min_width = 200):
|
243 |
text1 = gr.Textbox(visible = False)
|
244 |
#Button for calling AI Help
|
245 |
+
text_button = gr.Button("Buscar m谩s informaci贸n (IA)",
|
246 |
+
min_width = 200,
|
247 |
+
interactive = False
|
248 |
+
)
|
249 |
text2 = gr.Textbox(visible = False)
|
250 |
with gr.Column(scale = 2):
|
251 |
+
text_output_aiAnswer = gr.Textbox(label="Ayuda a mi respuesta", lines = 10, interactive = False)
|
252 |
+
|
253 |
+
inbtwContemplandoOne.click(
|
254 |
+
fn = activeSermonGuideZone,
|
255 |
+
inputs = inbtwContemplandoOne,
|
256 |
+
outputs = [text_output_guia, text_button, text_output_aiAnswer]
|
257 |
+
)
|
258 |
|
259 |
if __name__ == "__main__":
|
260 |
llmBuilder = GeminiLLM()
|