Juna190825 commited on
Commit
13ff441
·
verified ·
1 Parent(s): 93d50d5

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio_client import Client
3
+
4
+ # Wrap the predict call in a function
5
+ def ask_searchgpt(message):
6
+ client = Client("https://umint-searchgpt.hf.space/")
7
+ result = client.predict(
8
+ user_message={"text": message},
9
+ api_name="/public"
10
+ )
11
+ return result
12
+
13
+ # Create a simple Gradio interface
14
+ demo = gr.Interface(fn=ask_searchgpt, inputs="text", outputs="text")
15
+
16
+ # Launch the app
17
+ demo.launch()