Grey01 commited on
Commit
8d800b4
·
verified ·
1 Parent(s): 5022450

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
  import streamlit as st
 
3
 
4
- gradio_api = "https://b2e7dc20663679013e.gradio.live/"
5
- client = gr.interface.load(gradio_api)
6
 
7
  def chat_app():
8
  st.title('Digital Ink')
@@ -11,7 +11,10 @@ def chat_app():
11
  #handle user input
12
  if user_input:
13
  #using gradio api client to generate response
14
- response = client(user_input)
 
 
 
15
  st.chat_message('Digital Ink', response)
16
 
17
  if __name__ =='__main__':
 
1
  import gradio as gr
2
  import streamlit as st
3
+ from gradio_client import Client
4
 
5
+ client = Client("https://b2e7dc20663679013e.gradio.live/")
 
6
 
7
  def chat_app():
8
  st.title('Digital Ink')
 
11
  #handle user input
12
  if user_input:
13
  #using gradio api client to generate response
14
+ response = client.predict(
15
+ user_input,
16
+ api_name="/predict"
17
+ )
18
  st.chat_message('Digital Ink', response)
19
 
20
  if __name__ =='__main__':