File size: 685 Bytes
960741b
 
 
 
 
 
 
 
 
 
 
 
865d081
 
960741b
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import requests

def search_gpt(query):
    url = "https://5525ae68-3c2e-4122-b533-51f5280ba13b.id.repl.co/answer"
    params = {"query": query}
    response = requests.get(url, params=params)
    return response.json()["answer"]

iface = gr.Interface(fn=search_gpt, 
                     inputs=gr.inputs.Textbox(label="Enter your question here:"), 
                     outputs=gr.outputs.Textbox(label="Answer:"),
                     title="<a href='https://huggingface.co/spaces/ImagineAI-Real/SearchGPT'>SearchGPT</a>",
                     description="Use at <a href='https://search.splittichost.net/'>https://search.splittichost.net/</a>")

iface.launch()