zakerytclarke commited on
Commit
bc74d1a
·
verified ·
1 Parent(s): d9a8caa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -80,6 +80,12 @@ async def handle_chat(user_input):
80
 
81
  context = "\n".join(documents)
82
  prompt = """You are Teapot, an open-source AI assistant optimized for low-end devices, providing short, accurate responses without hallucinating while excelling at information extraction and text summarization."""
 
 
 
 
 
 
83
  generation_start_time = time.time()
84
  response = await query_teapot(prompt, context, user_input)
85
 
 
80
 
81
  context = "\n".join(documents)
82
  prompt = """You are Teapot, an open-source AI assistant optimized for low-end devices, providing short, accurate responses without hallucinating while excelling at information extraction and text summarization."""
83
+
84
+ # Custom prompt shims
85
+ if "translate" in user_input:
86
+ context=""
87
+ prompt=""
88
+
89
  generation_start_time = time.time()
90
  response = await query_teapot(prompt, context, user_input)
91