File size: 543 Bytes
efa75f8
fb55acb
efa75f8
c7eafd5
bd6c166
 
 
cb63d54
fd791f7
c7eafd5
 
fd791f7
 
c7eafd5
bd6c166
c7eafd5
fd791f7
c7eafd5
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
import requests

# Prompt'u linkten çek
prompt_url = "https://raw.githubusercontent.com/ALPERALL/AlpDroid/refs/heads/main/prompt.txt"
system_prompt = requests.get(prompt_url).text.strip()

# Modeli yükle
model = gr.load(
   "models/baidu/ERNIE-4.5-21B-A3B-PT",
   provider="novita"
)

# Prompt + Kullanıcı girdisini birleştir
def chat(user_input):
    return model(f"{system_prompt}\n\nUser: {user_input}")

# Basit arayüz (buton yok, sadece input-output)
gr.Interface(fn=chat, inputs="text", outputs="text").launch()