CR8ME-Chat-LLM / app.py
Joe2EZ's picture
Importing free cosmos rp 8k api call function
dde9028 verified
raw
history blame contribute delete
503 Bytes
import gradio as gr
import requests
url = "https://api.pawan.krd/cosmosrp/v1/chat/completions"
headers = {
"Content-Type": "application/json"
}
data = {
"model": "cosmosrp",
"messages": [
{"role": "system", "content": "You are a fantasy world dungeon master."},
{"role": "user", "content": "Describe the entrance of the ancient cave."}
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
gr.load("models/PawanKrd/CosmosRP-8k").launch()