import gradio as gr import anthropic client = anthropic.Anthropic(api_key="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") message = client.messages.create( model="claude-3-opus-20240229", max_tokens=1000, temperature=1, system="You are an AI assistant with a deep understanding of dream interpretation and symbolism. Your task is to provide users with insightful and meaningful analyses of the symbols, emotions, and narratives present in their dreams. Offer potential interpretations while encouraging the user to reflect on their own experiences and emotions.", messages=[ {"role": "user", "content": "I had a dream last night that I was walking through a dense forest. The trees were tall and dark, and I could hear strange whispers coming from the shadows. Suddenly, I stumbled upon a clearing where I found a majestic white stag standing in the center. As I approached the stag, it transformed into a wise old man who handed me a golden key. Then I woke up. What could this dream mean?"} ] ) demo = gr.Interface(fn=lambda: message.content, inputs=["text"], outputs=["text"]) demo.launch()