Rishit commited on
Commit
a3d3bb8
Β·
verified Β·
1 Parent(s): 595132a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -12,20 +12,18 @@ def get_response(user_input):
12
  # Check if the request was successful
13
  if response.status_code == 200:
14
  answer = response.text # API response is already a string
15
- return "πŸ•‰οΈ Guruji says: πŸ™\n\n" + answer
16
  else:
17
- return "πŸ™ Sorry, there was an error with your request."
18
-
19
 
20
  # Create the Gradio interface
21
  iface = gr.Interface(
22
  fn=get_response, # Function to call when user submits input
23
  inputs="text", # Input type
24
  outputs="text", # Output type
25
- title="πŸ•‰οΈ Temple Dekho Chat Bot πŸ•‰οΈ",
26
- description="🟒 You can now use, Backend Server is live!\n\nπŸ™ Ask a question about temples or rituals and get wise answers from Guruji!",
27
- theme="default", # Use the default theme
28
  )
29
 
30
- # Launch the Gradio app with a specific server port
31
- iface.launch(server_name="0.0.0.0", server_port=8709, share=True)
 
12
  # Check if the request was successful
13
  if response.status_code == 200:
14
  answer = response.text # API response is already a string
15
+ return answer
16
  else:
17
+ return "Sorry, there was an error with your request."
 
18
 
19
  # Create the Gradio interface
20
  iface = gr.Interface(
21
  fn=get_response, # Function to call when user submits input
22
  inputs="text", # Input type
23
  outputs="text", # Output type
24
+ title="Temple Dekho Chat Bot",
25
+ description="Ask a question about temples or rituals and get answers from the Guru!"
 
26
  )
27
 
28
+ # Launch the Gradio app
29
+ iface.launch(server_name="0.0.0.0", server_port=8709, share=True)