Update app.py
Browse files
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
|
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()
|