Spaces:
Sleeping
Sleeping
Update app.py
Browse files3 unmodified lines45678910789101112137 unmodified lines21222324242526273 unmodified lines
client = 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 echo(message, history): choices = ["yes", "no", "silly ahh question", "not likely", "ask again", "absolutely", "YASSS"] yes_or_no = random.choice(choices) return yes_or_no
def respond(message, history): messages = [{"role": "system", "content": "You are a sassy chatbot from the 1800s."}]7 unmodified lines max_tokens = 100, stream = True, ): token = messages.choices[0].delta.content token = delta.get("choices", [{}])[0].get("delta", {}).get("content", "") response += token yield response app.py+5-5