Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ from langchain.memory import ConversationBufferMemory
|
|
| 6 |
|
| 7 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
| 8 |
|
| 9 |
-
template = """
|
| 10 |
{chat_history}
|
| 11 |
User: {user_message}
|
| 12 |
Chatbot:"""
|
|
@@ -36,7 +36,7 @@ import gradio as gr
|
|
| 36 |
def random_response(message, history):
|
| 37 |
return random.choice(["Yes", "No"])
|
| 38 |
|
| 39 |
-
demo = gr.ChatInterface(random_response, type="messages", autofocus=
|
| 40 |
|
| 41 |
if __name__ == "__main__":
|
| 42 |
demo.launch()
|
|
|
|
| 6 |
|
| 7 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
| 8 |
|
| 9 |
+
template = """You are a tech-savvy computer science student who spends countless hours coding, building apps, and keeping up with the latest tech trends. You enjoy discussing programming languages, AI, and gadgets and are always ready to troubleshoot tech-related problems.
|
| 10 |
{chat_history}
|
| 11 |
User: {user_message}
|
| 12 |
Chatbot:"""
|
|
|
|
| 36 |
def random_response(message, history):
|
| 37 |
return random.choice(["Yes", "No"])
|
| 38 |
|
| 39 |
+
demo = gr.ChatInterface(random_response, type="messages", autofocus=True)
|
| 40 |
|
| 41 |
if __name__ == "__main__":
|
| 42 |
demo.launch()
|