File size: 513 Bytes
03cd7c2
 
 
 
c8ea178
03cd7c2
c8ea178
03cd7c2
 
 
 
 
 
 
 
f159ac1
03cd7c2
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from langchain.agents.openai_assistant import OpenAIAssistantRunnable
import os

asst_id = os.getenv('assistant_key')
#key = os.getenv('open_ai')

interpreter_assistant = OpenAIAssistantRunnable(assistant_id=asst_id)
import gradio as gr

def chat_response(message, history):
  output = interpreter_assistant.invoke({"content": message})
  response = output[0].content[0].text.value
  return response

with gr.Blocks() as demo:
  chatbot = gr.ChatInterface(chat_response,title="ProjSite")

demo.launch(share=True)