Floncer commited on
Commit
90aaac1
·
verified ·
1 Parent(s): bae68ac

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from llama_cpp import Llama
3
+
4
+ # Загружаем модель
5
+ llm = Llama(model_path="mini_llama.gguf")
6
+
7
+ def chat(message, history):
8
+ output = llm(message, max_tokens=500)
9
+ return output['choices'][0]['text']
10
+
11
+ # Запускаем интерфейс
12
+ gr.ChatInterface(
13
+ fn=chat,
14
+ title="Mini Llama",
15
+ description="Чат с моделью"
16
+ ).launch(share=True)