Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import streamlit as st
|
|
|
|
| 3 |
|
| 4 |
-
|
| 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(
|
|
|
|
|
|
|
|
|
|
| 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__':
|