Spaces:
Runtime error
Runtime error
Update app.py
Browse files2 unmodified lines34567891011121 unmodified line1415161718192 unmodified linesfrom huggingface_hub import InferenceClientclient = InferenceClient("HuggingFaceH4/zephyr-7b-beta")def respond(message, history):messages = [{"role": "system", "content": "You are a friendly chatbot."}]if history:messages.extend(history)1 unmodified linemessages.append({"role":"user", "content": message})response = client.chat_completion(messages, max_tokens=100)print(response['choices'][0]['message']['content'].strip())2 unmodified lines3456789101112131 unmodified line151617181920212 unmodified linesfrom huggingface_hub import InferenceClientclient = InferenceClient("HuggingFaceH4/zephyr-7b-beta")#change the LLMdef respond(message, history):messages = [{"role": "system", "content": "You are a friendly chatbot."}] #change the personalityif history:messages.extend(history)1 unmodified linemessages.append({"role":"user", "content": message})response = client.chat_completion(messages, max_tokens=100)# change length using max_tokensprint(response['choices'][0]['message']['content'].strip())
app.py+3-1