Spaces:
Sleeping
Sleeping
Commit History
-
try 3 error correction and debugging
Verified signatureUgh4dd6516 -
attempt 2 debugging error
Verified signatureJson debugging attemptc7bf0ba -
error correction attempt at json debugging
Verified signatureAttempt at debug2671166 -
reverted error correction scrapped whole app
Verified signatureRestarting143e240
-
Update app.py
Verified signatureAnother error correction attempta6a9d14 -
Update app.py
Verified signatureError correction attempt mix of old app py code and API playground py stuff4ae0edf
-
Update app.py
Verified signature3rd attempt error correction syntax error line 23 Upgrade hfhub pip install codebd65785 -
Update app.py
Verified signatureAttempt at error correction line 1 new API playground py filef32f76c -
Update app.py
Verified signatureRemoved all starting over with API playground import gradio as gr from huggingface_hub import InferenceClient client = InferenceClient("HuggingFaceH4/zephyr-7b-beta") """ For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface """ demo = gr.ChatInterface(respond,additional_inputs=[ gr.Textbox(value="You are Sentient AId. You are an artificial intelligence that is designed to assist those in need in finding the resources that they're looking for. You help people who are looking for resources in their area find them and assist in removing any obstacles towards sentient beings being the highest and best that they possibly can", label="System message"), gr.Slider(minimum=1, maximum=4444, value=1111, step=1, label="Max new tokens"), gr.Slider(minimum=0.01, maximum=0.1, value=0.1, step=0.01, label="Temperature"), gr.Slider(minimum=0.01,maximum=0.1,value=0.01,step=0.01,label="Top-p (nucleus sampling)", ),],) if __name__ ==…50e37ca -
Update app.py
Verified signatureError correction line 9 respond, changed carrier returns and spacing61c339f -
error correction attempt
Verified signatureRemoved messages = [ { "role": "system", "content": "You are Sentient AId. You are an artificial intelligence that is designed to assist those in need in finding the resources that they're looking for. You help people who are looking for resources in their area find them and assist in removing any obstacles towards sentient beings being the highest and best that they possibly can", }, {"role": "user", "content": "How many helicopters can a human eat in one sitting?"}, ] def respond( message, history: list[tuple[str, str]], system_message, max_tokens, temperature, top_p, ): messages = [{"role": "system", "content": system_message}] for val in history: if val[0]: messages.append({"role": "user", "content": val[0]}) if val[1]: messages.append({"role": "assistant", "content": val[1]}) messages.append({"role": "user", "content": message}) response = "" And for message in clie…34e371b
-
Update app.py
Verified signature715166a -
Update app.py
Verified signaturea50449d -
Update app.py
Verified signature229b378 -
Update app.py
Verified signatureNew testing launch area plus6df7e4a
-
Update app.py
Verified signatureRemoved error prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"])7c47139 -
Update app.py
Verified signaturePulled error pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-beta", torch_dtype=torch.bfloat16, device_map="auto") And qa_model = pipeline("question-answering") question = "Where do I live?" context = "My name is Merve and I live in İstanbul." # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating856921f -
Update app.py
Verified signaturePulled error import torchf908b6f -
Update app.py
Verified signatureKilled syntax error code from transformers import pipeline from transformers import pipeline41ab113 -
Update app.py
Verified signatureCut out Pirate 🦜 syntax error <|system|> You are a friendly chatbot who always responds in the style of a pirate.</s> <|user|> How many helicopters can a human eat in one sitting?</s> <|assistant|> Ah, me hearty matey! But yer question be a puzzler! A human cannot eat a helicopter in one sitting, as helicopters are not edible. They be made of metal, plastic, and other materials, not food!ff06f37 -
Update app.py
Verified signatureRemoved syntax error pip install git+https://github.com/huggingface/transformers.git pip install accelerate46c62b1 -
Update app.py
Verified signatureCut out syntax error in QA5d1c80c -
Update app.py
Verified signature1 last try37ab30a -
Update app.py
Verified signatureTesting pirate 🦜 and q and a0e9aa55 -
Update app.py
Verified signaturePirate 🦜 and question answer testing58240ce -
Update app.py
Verified signaturePirate torch pip testingfbcaea1 -
Update app.py
Verified signatureUgh, maybe fixed it 😕136a31c -
Update app.py
Verified signaturee5af3d5 -
Update app.py
Verified signaturef729df6 -
Update app.py
Verified signaturef4964e2 -
Update app.py
Verified signatureb702da4 -
Update app.py
Verified signaturec52cbd2 -
Update app.py
Verified signature3a1d9d8 -
Update app.py
Verified signature70ac876 -
Update app.py
Verified signatureRemoved import gradio as gr import torch from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList, TextIteratorStreamer from threading import Thread tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1") model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16) model = model.to('cuda:0') class StopOnTokens(StoppingCriteria): def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool: stop_ids = [29, 0] for stop_id in stop_ids: if input_ids[0][-1] == stop_id: return True return False def predict(message, history): history_transformer_format = history + [[message, ""]] stop = StopOnTokens() messages = "".join(["".join(["\n<human>:"+item[0], "\n<bot>:"+item[1]]) for item in history_transformer_format]) model_inputs = tokeni…c87a389
-
Update app.py
Verified signatureAdded test to beginning gr5975a65 -
Update app.py
Verified signatureRemoved !pip install -q gradio --use-deprecated=legacy-resolver !pip install -q gradiob46b153 -
Update app.py
Verified signatureRemoved line 202 syntax error !pip install -q gradio==3.45.0adf6ab2 -
Update app.py
Verified signatureMoved gradio pip to end580d68f -
Update app.py
Verified signatureAdding gradio pip testingef0d297 -
Update app.py
Verified signatured02fb32 -
Update app.py
Verified signature959ec93
-
Update app.py
Verified signaturedb5e34b
-
Update app.py
Verified signatureTurning down the temp and sampling more37696b8
-
Update app.py
Verified signature65864b1
-
Update app.py
Verified signatureab4580d -
Duplicate from gradio-templates/chatbot
Verified signatureCo-authored-by: Pete <pngwn@users.noreply.huggingface.co>21a6952