Spaces:
Sleeping
Sleeping
| 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() |