AxisCommunity commited on
Commit
c684ee8
·
verified ·
1 Parent(s): 6838c1a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ # Загружаем твою модель Orion Zet
5
+ # Благодаря 16 ГБ ОЗУ в Space, она должна загрузиться без проблем
6
+ pipe = pipeline("text-generation", model="AxisCommunity/OrionZetAI-Nano-Alpha")
7
+
8
+ def generate(text):
9
+ # Генерация ответа от твоей нейронки
10
+ result = pipe(text, max_new_tokens=50, do_sample=True)
11
+ return result[0]['generated_text']
12
+
13
+ # Создаем простой интерфейс чата
14
+ demo = gr.Interface(
15
+ fn=generate,
16
+ inputs=gr.Textbox(lines=2, placeholder="Напиши что-нибудь Orion Zet..."),
17
+ outputs="text",
18
+ title="Orion Zet AI Cloud"
19
+ )
20
+
21
+ demo.launch()