crypto_crewAI / chat_gradio.py
quocdat25's picture
Upload folder using huggingface_hub
6feb994 verified
raw
history blame
672 Bytes
# from langchain_community.llms import HuggingFaceEndpoint
# from langchain.prompts import PromptTemplate
# from langchain.schema import AIMessage, HumanMessage
# from langchain.chains import LLMChain
import gradio as gr
import os
from crew import CryptoCrew
from dotenv import load_dotenv
load_dotenv()
# @TODO: Stream, show instruction
def predict(message, history):
# company = input(
# dedent("""
# Which cryptocurrency are you looking to delve into?
# """))
crypto_crew = CryptoCrew(message)
response = "## Here is the Report\n\n" + crypto_crew.run()
return response
gr.ChatInterface(predict).launch()