Spaces:
Runtime error
Runtime error
File size: 604 Bytes
24d30ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import gradio as gr
from characterai import PyCAI
print("[Loaded Modules]")
def greet(name):
return "Hello " + name + "!!"
def main():
print("[Running CAI]")
client = PyCAI('21da3532eb9ccc08b460231aed336d7ff01405eb')
print("[CAI Client LOADED] ", client)
client.start()
print("[CAI Client STARTED]")
char = '0h987W8pU_xgva-fcWYG27EnJtnmj3UtCCu7H_wAEco' # character
chat = client.chat.get_chat(char)
print("[CAI Char LOADED]", char)
main()
print("A")
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
print("[Gradio Launched]")
iface.launch() |