File size: 660 Bytes
daef6f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import gradio as gr
from transformers import pipeline

# Load a small but capable model for free hosting
chatbot = pipeline("text-generation", model="EleutherAI/gpt-neo-1.3B")

def ask_ai(message):
    response = chatbot(message, max_length=200, do_sample=True, temperature=0.7)
    return response[0]["generated_text"]

interface = gr.Interface(
    fn=ask_ai,
    inputs=gr.Textbox(lines=2, placeholder="Ask about the universe..."),
    outputs="text",
    title="VERTEXAS INTL AI 🌐",
    description="Explore global and cosmic knowledge with open-source AI.",
    theme="compact"
)

if __name__ == "__main__":
    interface.launch()