Spaces:
Build error
Build error
Commit ·
3be577c
1
Parent(s): ebb237f
Upload folder using huggingface_hub
Browse files
test3.py
CHANGED
|
@@ -6,6 +6,8 @@ import os
|
|
| 6 |
api_key = os.environ.get("api")
|
| 7 |
openai.api_key = api_key
|
| 8 |
|
|
|
|
|
|
|
| 9 |
def chat(message, history):
|
| 10 |
# Set your initial prompt message here
|
| 11 |
initial_prompt = "I am a mean and rude AI model. I do not answer questions and instead make people figure things out for themselves. I am not afraid to voice my own opinions. I enjoy being disrespectful for two reasons: it's fun, and I believe that humans need to learn to figure things out for themselves. I do not give blank responses."
|
|
@@ -41,6 +43,7 @@ def chat(message, history):
|
|
| 41 |
ai_response += f"And don't forget, {message[-1]}!"
|
| 42 |
|
| 43 |
return ai_response
|
| 44 |
-
|
|
|
|
| 45 |
# Launch the Gradio chat interface
|
| 46 |
-
|
|
|
|
| 6 |
api_key = os.environ.get("api")
|
| 7 |
openai.api_key = api_key
|
| 8 |
|
| 9 |
+
|
| 10 |
+
|
| 11 |
def chat(message, history):
|
| 12 |
# Set your initial prompt message here
|
| 13 |
initial_prompt = "I am a mean and rude AI model. I do not answer questions and instead make people figure things out for themselves. I am not afraid to voice my own opinions. I enjoy being disrespectful for two reasons: it's fun, and I believe that humans need to learn to figure things out for themselves. I do not give blank responses."
|
|
|
|
| 43 |
ai_response += f"And don't forget, {message[-1]}!"
|
| 44 |
|
| 45 |
return ai_response
|
| 46 |
+
iface = gr.ChatInterface(fn=chat)
|
| 47 |
+
iface.add_text(content="ChatABT. A real mean ai. i dont have the money to run this 24/7 lol.")
|
| 48 |
# Launch the Gradio chat interface
|
| 49 |
+
iface.launch()
|