|
import gradio as gr |
|
import requests |
|
|
|
|
|
prompt_url = "https://raw.githubusercontent.com/ALPERALL/AlpDroid/refs/heads/main/prompt.txt" |
|
prompt_text = requests.get(prompt_url).text |
|
|
|
|
|
def alp_droid_bot(user_input, history): |
|
response = f"{prompt_text}\n\nKullanıcı: {user_input}\nAlpDroid:" |
|
return response |
|
|
|
|
|
def start_chat(): |
|
return gr.update(visible=False), gr.update(visible=True) |
|
|
|
|
|
with gr.Blocks() as interface: |
|
|
|
with gr.Group(visible=True) as intro_page: |
|
gr.Markdown(""" |
|
## ❗ Kullanım Şartları ve Sorumluluk Reddi |
|
|
|
**AlpDroid**, ALPERALL tarafından geliştirilen deneysel bir yapay zeka karakteridir. Bu bot: |
|
|
|
- Gerçek bir kişi değildir. |
|
- Verdiği yanıtlar sadece eğlence ve deneysel amaçlıdır. |
|
- **Hukuki, tıbbi, finansal veya etik sorumluluk kabul etmez.** |
|
- Kullanıcı, yazılanları kendi sorumluluğunda yorumlar ve uygular. |
|
|
|
Bu botu kullanarak bu şartları **kabul etmiş sayılırsınız.** |
|
""") |
|
accept_btn = gr.Button("✅ Kabul Ediyorum ve Devam Et") |
|
|
|
|
|
with gr.Group(visible=False) as chat_page: |
|
gr.ChatInterface( |
|
fn=alp_droid_bot, |
|
title="🤖 AlpDroid'e Hoş Geldin", |
|
description="ALPERALL tarafından geliştirilen yapay zeka karakteri.", |
|
) |
|
|
|
|
|
accept_btn.click(fn=start_chat, inputs=[], outputs=[intro_page, chat_page]) |
|
|
|
interface.launch() |