VeuReu commited on
Commit
b28c85b
verified
1 Parent(s): 2e6bd63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -253,18 +253,18 @@ with gr.Blocks(title="Salamandra 7B Instruct 路 ZeroGPU",css=custom_css,theme=gr
253
  gr.Markdown('<h2 style="text-align:center">Resumir frases</h2>')
254
  with gr.Row():
255
  with gr.Column(scale=1):
256
- frase = gr.Textbox(label="Frase a resumir", value="", lines=3)
257
- num_paraules = gr.Textbox(label="Nombre de paraules del resum", value="4")
258
  with gr.Column(scale=1):
259
- out_resumir = gr.Textbox(label="Resposta", lines=18)
260
  with gr.Row():
261
- btn_resumir = gr.Button("Resumir", variant="primary")
262
 
263
- btn_resumir.click(
264
  resume_sentence,
265
- inputs=[frase, num_paraules],
266
- outputs=out_resumir,
267
- api_name="resumir",
268
  concurrency_limit=1
269
  )
270
  gr.Markdown("---")
@@ -272,18 +272,18 @@ with gr.Blocks(title="Salamandra 7B Instruct 路 ZeroGPU",css=custom_css,theme=gr
272
  gr.Markdown('<h2 style="text-align:center">Inclusi贸 d鈥檌dentitats</h2>')
273
  with gr.Row():
274
  with gr.Column(scale=1):
275
- frase = gr.Textbox(label="Frase a modificar", value="", lines=3)
276
- persona = gr.Textbox(label="Persones reconegudes", value='"Mireia Mart铆": 4, "Xavier Busquets": 5')
277
  with gr.Column(scale=1):
278
  out_modificat = gr.Textbox(label="Resposta", lines=18)
279
  with gr.Row():
280
- btn_modificar = gr.Button("Modificar frase", variant="primary")
281
 
282
- btn_modificar.click(
283
  identity_manager,
284
- inputs=[frase, persona],
285
  outputs=out_modificat,
286
- api_name="modificar",
287
  concurrency_limit=1
288
  )
289
 
@@ -291,11 +291,11 @@ with gr.Blocks(title="Salamandra 7B Instruct 路 ZeroGPU",css=custom_css,theme=gr
291
  with gr.Row():
292
  with gr.Column(scale=1):
293
  srt = gr.Textbox(label="Audiodescripci贸", value="(AD)\nTOTS CANTANT: avui celebrem la nostra festa major\nAINA: som hi tots a ballar", lines=3)
294
- btn_modificar = gr.Button("Generar narraci贸 lliure", variant="primary")
295
  with gr.Column(scale=1):
296
  narraci贸_lliure = gr.Textbox(label="Narraci贸 lliure", lines=18)
297
 
298
- btn_modificar.click(
299
  free_narration,
300
  inputs=[srt],
301
  outputs=narraci贸_lliure,
 
253
  gr.Markdown('<h2 style="text-align:center">Resumir frases</h2>')
254
  with gr.Row():
255
  with gr.Column(scale=1):
256
+ sentence = gr.Textbox(label="Frase a resumir", value="", lines=3)
257
+ num_words = gr.Textbox(label="Nombre de paraules del resum", value="4")
258
  with gr.Column(scale=1):
259
+ out_resume = gr.Textbox(label="Resposta", lines=18)
260
  with gr.Row():
261
+ btn_resume = gr.Button("Resumir", variant="primary")
262
 
263
+ btn_resume.click(
264
  resume_sentence,
265
+ inputs=[sentence, num_words],
266
+ outputs=out_resume,
267
+ api_name="resume",
268
  concurrency_limit=1
269
  )
270
  gr.Markdown("---")
 
272
  gr.Markdown('<h2 style="text-align:center">Inclusi贸 d鈥檌dentitats</h2>')
273
  with gr.Row():
274
  with gr.Column(scale=1):
275
+ sentence = gr.Textbox(label="Frase a modificar", value="", lines=3)
276
+ person = gr.Textbox(label="Persones reconegudes", value='"Mireia Mart铆": 4, "Xavier Busquets": 5')
277
  with gr.Column(scale=1):
278
  out_modificat = gr.Textbox(label="Resposta", lines=18)
279
  with gr.Row():
280
+ btn_modify = gr.Button("Modificar frase", variant="primary")
281
 
282
+ btn_modify.click(
283
  identity_manager,
284
+ inputs=[sentence, person],
285
  outputs=out_modificat,
286
+ api_name="modificat",
287
  concurrency_limit=1
288
  )
289
 
 
291
  with gr.Row():
292
  with gr.Column(scale=1):
293
  srt = gr.Textbox(label="Audiodescripci贸", value="(AD)\nTOTS CANTANT: avui celebrem la nostra festa major\nAINA: som hi tots a ballar", lines=3)
294
+ btn_modify = gr.Button("Generar narraci贸 lliure", variant="primary")
295
  with gr.Column(scale=1):
296
  narraci贸_lliure = gr.Textbox(label="Narraci贸 lliure", lines=18)
297
 
298
+ btn_modify.click(
299
  free_narration,
300
  inputs=[srt],
301
  outputs=narraci贸_lliure,