Chris4K commited on
Commit
157c212
1 Parent(s): 96e348d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -291,7 +291,7 @@ task = gr.Interface(
291
  title=title,
292
  description=desc,
293
  examples=examples
294
- ).launch()
295
 
296
 
297
  ####
@@ -409,12 +409,21 @@ def callChains(current_message):
409
 
410
 
411
  ###
412
- current_message_inputfield = gr.Textbox(label="Gib hier eine Nachricht ein")
413
  final_answer_inputfield = gr.Textbox(label="Antwort ")
414
  sentiment_analysis_result_inputfield = gr.Textbox(label="Sentiment ")
415
  topic_sale_inform_result_inputfield = gr.Textbox(label="Thema ")
416
 
417
- chat_bot = gr.Interface(fn=callChains , inputs=current_message_inputfield, outputs=[final_answer_inputfield,sentiment_analysis_result_inputfield,topic_sale_inform_result_inputfield], title="Conversation Bot with extra")
 
 
 
 
 
 
 
 
 
418
  # create a public link, set `share=True` in `launch()
419
  #chat_bot.launch()
420
  ####################
 
291
  title=title,
292
  description=desc,
293
  examples=examples
294
+ )
295
 
296
 
297
  ####
 
409
 
410
 
411
  ###
412
+ current_message_inputfield = gr.Textbox(lines=5,max_lines=6,label="Gib hier eine Nachricht ein")
413
  final_answer_inputfield = gr.Textbox(label="Antwort ")
414
  sentiment_analysis_result_inputfield = gr.Textbox(label="Sentiment ")
415
  topic_sale_inform_result_inputfield = gr.Textbox(label="Thema ")
416
 
417
+ chat_bot = gr.Interface(fn=callChains ,
418
+ inputs=[
419
+ current_message_inputfield,
420
+ gr.Slider(minimum=1.0,maximum=200.0,value=50.0,step=1,interactive=True,label="max_length"),
421
+ gr.Slider(minimum=1.0,maximum=20.0,value=1.0,step=1,interactive=True,label="length_penalty"),
422
+ gr.Slider(minimum=0.0,maximum=5.0,value=3.0,step=1,interactive=True,label="no_repeat_ngram_size"),
423
+ gr.Slider(minimum=1.0,maximum=20.0,value=1.0,step=1,interactive=True,label="num_beams"),
424
+ gr.Dropdown(["Deutsch", "Englisch"],value="Deutsch"),
425
+ ],
426
+ outputs=[final_answer_inputfield,sentiment_analysis_result_inputfield,topic_sale_inform_result_inputfield], title="Conversation Bot with extra")
427
  # create a public link, set `share=True` in `launch()
428
  #chat_bot.launch()
429
  ####################