cyber-iq / app.py
ali3133's picture
Create app.py
d0bf7a0 verified
raw
history blame contribute delete
686 Bytes
import gradio as gr
from transformers import pipeline
# تحميل النموذج (اختر النموذج الذي تريده، مثلاً BaronLLM)
model_id = "AlicanKiraz0/Cybersecurity-BaronLLM_Offensive_Security_LLM_Q6_K_GGUF"
pipe = pipeline("text-generation", model=model_id, device_map="auto")
def generate(prompt):
result = pipe(prompt, max_new_tokens=512)[0]["generated_text"]
return result
iface = gr.Interface(
fn=generate,
inputs=gr.Textbox(label="Prompt", lines=5),
outputs=gr.Textbox(label="Response", lines=10),
title="Offensive Security LLM",
description="Ask about exploits, red team tactics, or vulnerability analysis."
)
iface.launch()