chatlite / app.py
TRaw's picture
Update app.py
17e8f26
raw
history blame contribute delete
626 Bytes
import os
import gradio as gr
from langchain.llms import Together
os.environ["TOGETHERAI_API_KEY"] = "f722a9f6e3afd6b9999e6aee02aeac9e751ea3a67b124c3667ab50c85c7fa99e" # Replace with your key
llm = Together(
model="mistralai/Mistral-7B-v0.1",
temperature=0.7,
max_tokens=128,
top_k=1,
together_api_key="f722a9f6e3afd6b9999e6aee02aeac9e751ea3a67b124c3667ab50c85c7fa99e"
)
input_ = """You are a teacher with a deep knowledge of machine learning and AI. \
You provide succinct and accurate answers. Answer the following question:
What is a large language model?"""
gr.ChatInterface(llm(input_)).launch()