File size: 670 Bytes
3911b7f
 
 
 
907ef02
3911b7f
f09ab5a
907ef02
 
d75866e
 
 
 
 
5bfab8c
b16f688
d75866e
 
 
 
 
4d2da6c
 
 
d75866e
 
f09ab5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from transformers import pipeline, Conversation
import streamlit as st
from streamlit_option_menu import option_menu

chatbot = pipeline(task="conversational", model="microsoft/DialoGPT-medium")

def Convo():
    if convo := st.chat_input("Enter your message")
    
    conversation = Conversation(convo)



    # candidate_labels = ["HELP", "PROBLEM SOLVE", "GENERAL TALK"]
  
   
    ans = chatbot(conversation)
    # add_user_input = st.button("Add User Input")

    # conversation.add_user_input("{}".format(convo))
    # conversation = chatbot(conversation)
    with st.chat_message("assistant"):
        ans.generated_responses[-1]
    # st.write(ans)


# convo()