alex-abb commited on
Commit
fa7e230
1 Parent(s): ca04f0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -12,6 +12,7 @@ system_message = """Classify the text into neutral, negative or positive.
12
  Text: This movie is definitely one of my favorite movies of its kind. The interaction between respectable and morally strong characters is an ode to chivalry and the honor code amongst thieves and policemen.
13
  Sentiment:
14
  """
 
15
  @spaces.GPU
16
  # Fonction pour générer une réponse à partir du message de l'utilisateur
17
  def generate_response(user_message, history):
@@ -45,9 +46,9 @@ def generate_response(user_message, history):
45
  # Configurer et lancer l'interface de chat avec Gradio
46
  iface = gr.Interface(
47
  fn=generate_response,
48
- inputs=[gr.inputs.Textbox(lines=2, placeholder="Enter your message here..."), gr.inputs.State()],
49
- outputs=[gr.outputs.State(), gr.outputs.Textbox()],
50
  live=True,
51
  )
52
 
53
- gr.ChatInterface(generate_response).launch()
 
12
  Text: This movie is definitely one of my favorite movies of its kind. The interaction between respectable and morally strong characters is an ode to chivalry and the honor code amongst thieves and policemen.
13
  Sentiment:
14
  """
15
+
16
  @spaces.GPU
17
  # Fonction pour générer une réponse à partir du message de l'utilisateur
18
  def generate_response(user_message, history):
 
46
  # Configurer et lancer l'interface de chat avec Gradio
47
  iface = gr.Interface(
48
  fn=generate_response,
49
+ inputs=[gr.Textbox(lines=2, placeholder="Enter your message here..."), gr.State()],
50
+ outputs=[gr.State(), gr.Textbox()],
51
  live=True,
52
  )
53
 
54
+ iface.launch()