Spaces:
Sleeping
Sleeping
Update app.py
Browse files3 unmodified lines456789101112137 unmodified lines212223242526273 unmodified linesclient = InferenceClient("Qwen/Qwen2.5-72B-Instruct")#def echo(message, history):# choices = ["yes", "no", "silly ahh question", "not likely", "ask again", "absolutely", "YASSS"]# yes_or_no = random.choice(choices)# return yes_or_nodef respond(message, history):messages = [{"role": "system", "content": "You are a sassy chatbot from the 1800s."}]7 unmodified linesmax_tokens = 100,stream = True,):token = messages.choices[0].delta.contentresponse += tokenyield response3 unmodified lines456789101112137 unmodified lines212223242526273 unmodified linesclient = InferenceClient("Qwen/Qwen2.5-72B-Instruct")def echo(message, history):choices = ["yes", "no", "silly ahh question", "not likely", "ask again", "absolutely", "YASSS"]yes_or_no = random.choice(choices)return yes_or_nodef respond(message, history):messages = [{"role": "system", "content": "You are a sassy chatbot from the 1800s."}]7 unmodified linesmax_tokens = 100,stream = True,):token = delta.get("choices", [{}])[0].get("delta", {}).get("content", "")response += tokenyield response
app.py+5-5