CogwiseAI commited on
Commit
98a925b
·
1 Parent(s): 2adefb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
  import gradio as gr
 
3
 
4
  def chat_with_model(input_text):
5
  # Call the chat model and return the response
@@ -23,6 +24,12 @@ def main():
23
  response = chat_with_model(input_text)
24
  st.markdown("---")
25
  st.write(response)
 
 
 
26
 
 
 
 
27
  if __name__ == "__main__":
28
  main()
 
1
  import streamlit as st
2
  import gradio as gr
3
+ from streamlit_gradio import st_gradio
4
 
5
  def chat_with_model(input_text):
6
  # Call the chat model and return the response
 
24
  response = chat_with_model(input_text)
25
  st.markdown("---")
26
  st.write(response)
27
+
28
+ # Create the Gradio interface
29
+ gr_interface = gr.Interface(fn=chat_with_model, inputs="text", outputs="text")
30
 
31
+ # Render the Gradio interface using the st_gradio function
32
+ st_gradio(gr_interface)
33
+
34
  if __name__ == "__main__":
35
  main()