File size: 1,946 Bytes
9f9394b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
# SPDX-License-Identifier: Apache-2.0
#

from src.chat.handler import chat
from config import DESCRIPTION
import gradio as gr

with gr.Blocks(fill_height=True, fill_width=True) as app:
    with gr.Sidebar(): 
        gr.HTML(DESCRIPTION)
    
    gr.ChatInterface(
        fn=chat,
        chatbot=gr.Chatbot(
            label="SearchGPT | V3",
            type="messages",
            show_copy_button=True,
            scale=1
        ),
        type="messages",
        multimodal=True,
        flagging_mode="manual",
        flagging_dir="/app",
        examples=[
            ["Introduce yourself fully without withholding anything"],
            ["Give me a short introduction to large language model"],
            ["Open this link https://huggingface.co/spaces?sort=trending and check what is currently trending?"],
            ["Find information about UltimaX Intelligence"],
            ["DeepSeek has just released DeepSeek V3.2, can you find out more?"],
            ["Find information for me about SearchGPT by umint and directly compare it with ChatGPT Search and Perplexity"],
            ["Please find information online regarding the current trends for this month"],
            ["Find information related to the dangers of AI addiction, including real-life examples"],
            ["Search for images related to artificial intelligence"],
            [{"text": "Find similar themes online (using web search) as shown in this image",
              "files": ["assets/images/ai-generated.png"]}]
        ],
        cache_examples=False,
        textbox=gr.MultimodalTextbox(
            file_types=["image"],
            placeholder="Ask SearchGPT anything…",
            stop_btn=True
        ),
        show_api=False
    )

app.queue(
  max_size=1,
  default_concurrency_limit=1
).launch(
  server_name="0.0.0.0",
  pwa=True,
  max_file_size="1mb",
  mcp_server=True
)