Curaf commited on
Commit
2e11bd4
1 Parent(s): cc9a723

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,12 +13,12 @@ def parla(context, question,creativity):
13
  # Qua puoi eventualmente aggiungere alla domanda un contesto specifico
14
  ############################################################################
15
  prompt="Rispondi alla domanda in base al seguente contesto:\n\nContesto:"+context+"\n\nDomanda: "+question
16
- return(chatbot.chat(prompt,temperature=creativity))
17
  ### Fine ###
18
 
19
  iface = gr.Interface(
20
  fn=parla,
21
- inputs=[gr.Textbox(lines=2, placeholder="Context for next question"),"text",gr.Slider(0.0,1.0,value=0.2,step=0.1)],
22
  outputs="text"
23
  )
24
  iface.launch()
 
13
  # Qua puoi eventualmente aggiungere alla domanda un contesto specifico
14
  ############################################################################
15
  prompt="Rispondi alla domanda in base al seguente contesto:\n\nContesto:"+context+"\n\nDomanda: "+question
16
+ return(chatbot.chat(prompt,temperature=float(creativity)))
17
  ### Fine ###
18
 
19
  iface = gr.Interface(
20
  fn=parla,
21
+ inputs=[gr.Textbox(lines=2, placeholder="Context for next question"),"text",gr.Slider(0,1,value=0.2,step=0.1)],
22
  outputs="text"
23
  )
24
  iface.launch()