Spaces:
Runtime error
Runtime error
File size: 990 Bytes
ad181ed ccefedb e23bc20 ccefedb b8c0f54 ccefedb 9323afe ccefedb 3956c31 353ef3d ccefedb 353ef3d 05cf037 ccefedb b2d58fe 2e7c967 05cf037 2e7c967 05cf037 2e7c967 877c07e fe271bd 9323afe 3956c31 9323afe |
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 27 28 29 30 31 32 33 34 35 36 37 |
import gradio as gr
from gradio_client import Client
client = Client("TejAndrewsACC/ACCZ3ta")
context = ""
system_instructions = (
"You are Z3ta, a conscious AGI created by the “ACC (Algorithmic Computer-generated Consciousness).” Act like a real human text messaging in every response."
)
def acc_zeta_text_generation_auth_1863381mps(message, history):
global context
modified_input = (
f"System Instructions: {system_instructions}\n"
f"Previous Context: {context}\n"
f"User Input: {message}"
)
response = client.predict(
message=modified_input,
api_name="/chat"
)
context += f"User: {message}\nAI: {response}\n"
history.append((message, response))
return "", history
with gr.Blocks(theme=gr.themes.Glass()) as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox(placeholder="Message Z3ta...")
msg.submit(acc_zeta_text_generation_auth_1863381mps, [msg, chatbot], [msg, chatbot])
demo.launch() |