Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
3 |
import gradio as gr
|
4 |
import torch
|
@@ -44,12 +43,15 @@ def chatbot(user_input):
|
|
44 |
reply = generate_reply(logic)
|
45 |
return reply
|
46 |
|
47 |
-
|
|
|
48 |
inputs=gr.Textbox(lines=2, placeholder="Type your message..."),
|
49 |
outputs="text",
|
50 |
title="Three-Agent Hugging Face Chatbot",
|
51 |
description="Intent detection + domain logic + natural generation")
|
52 |
|
53 |
-
|
|
|
|
|
54 |
|
55 |
|
|
|
|
|
1 |
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
2 |
import gradio as gr
|
3 |
import torch
|
|
|
43 |
reply = generate_reply(logic)
|
44 |
return reply
|
45 |
|
46 |
+
# Gradio interface
|
47 |
+
iface = gr.Interface(fn=chatbot,
|
48 |
inputs=gr.Textbox(lines=2, placeholder="Type your message..."),
|
49 |
outputs="text",
|
50 |
title="Three-Agent Hugging Face Chatbot",
|
51 |
description="Intent detection + domain logic + natural generation")
|
52 |
|
53 |
+
iface.launch()
|
54 |
+
|
55 |
+
|
56 |
|
57 |
|