Spaces:
Runtime error
Runtime error
Update app.py
Browse files123456789102 unmodified lines131415161718192043 unmodified lines64656667686970import gradio as grimport copyimport timeimport ctypes # to run on C api directlyimport llama_cppfrom llama_cpp import Llamafrom huggingface_hub import hf_hub_download # load from huggingfacesllm = Llama(2 unmodified linesfilename="llama-2-7b-chat.ggmlv3.q5_0.bin",),n_ctx=2048,n_gpu_layers=500,) # download model from hf/ n_ctx=2048 for high ccontext lengthhistory = []43 unmodified linesdemo = gr.ChatInterface(generate_text,title="llama-cpp-python on GPU",description="Running LLM with https://github.com/abetlen/llama-cpp-python. btw the text streaming thing was the hardest thing to impliment",examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],cache_examples=True,retry_btn=None,1234567892 unmodified lines121314151617181943 unmodified lines63646566676869import gradio as grimport copyimport timeimport llama_cppfrom llama_cpp import Llamafrom huggingface_hub import hf_hub_downloadllm = Llama(2 unmodified linesfilename="llama-2-7b-chat.ggmlv3.q5_0.bin",),n_ctx=2048,n_gpu_layers=500, # change n_gpu_layers if you have more or less VRAM)history = []43 unmodified linesdemo = gr.ChatInterface(generate_text,title="llama-cpp-python on GPU",description="Running LLM with https://github.com/abetlen/llama-cpp-python",examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],cache_examples=True,retry_btn=None,
app.py+4-5