Spaces:
Build error
Build error
Update app.py
Browse files4 unmodified lines567891011121314151617184 unmodified linesclient = InferenceClient("HuggingFaceH4/zephyr-7b-beta") #change the LLMdef respond(message, history):messages = [{"role": "system", "content": "You are a friendly chatbot."}]if history:messages.extend(history)messages.append({"role":"user", "content": message})response = client.chat_completion(messages,max_tokens = 1000, #change the lengthtemperature = 100,top_p = 0.7)print(response["choices"][0]["message"]["content"].strip())4 unmodified lines567891011121314151617184 unmodified linesclient = InferenceClient("HuggingFaceH4/zephyr-7b-beta") #change the LLMdef respond(message, history):messages = [{"role": "system", "content": "You are a mean chatbot."}]if history:messages.extend(history)messages.append({"role":"user", "content": message})response = client.chat_completion(messages,max_tokens = 1000, #change the lengthtemperature = 0.5,top_p = 0.7)print(response["choices"][0]["message"]["content"].strip())
app.py+2-2