Spaces:
Sleeping
Sleeping
Update app.py
Browse files12345678910from llama_cpp import Llamaimport gradio as grllm = Llama(model_path="./qwen1_8b.gguf")def chat_fn(prompt):result = llm(prompt, max_tokens=200)return result['choices'][0]['text']gr.Interface(fn=chat_fn, inputs="text", outputs="text", title="Qwen 1.8B на CPU").launch()123456789101112import timeimport gradio as grdef slow_echo(message, history):for i in range(len(message)):time.sleep(0.3)yield "You typed: " + message[: i+1]gr.ChatInterface(fn=slow_echo,type="messages").launch()
app.py+9-7