Spaces:
Sleeping
Sleeping
Update app.py
Browse files11234456786789109101112from llama_cpp import Llamaimport timeimport gradio as gr
llm = Llama(model_path="./qwen1_8b.gguf")def slow_echo(message, history): for i in range(len(message)): time.sleep(0.3) yield "You typed: " + message[: i+1]
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()gr.ChatInterface( fn=slow_echo, type="messages").launch()app.py+9-7