File size: 626 Bytes
e8a266e
 
f7a82b4
e8a266e
f7a82b4
e8a266e
f7a82b4
 
 
 
 
17e8f26
f7a82b4
e8a266e
f7a82b4
 
e8a266e
f7a82b4
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()