Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
49 |
-
outputs=[gr.
|
50 |
live=True,
|
51 |
)
|
52 |
|
53 |
-
|
|
|
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()
|