Spaces:
Runtime error
Runtime error
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() |