hpratapsingh commited on
Commit
2d497be
·
verified ·
1 Parent(s): b7f68bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -14
app.py CHANGED
@@ -1,20 +1,14 @@
1
- # app.py - Gradio Interface
2
-
3
  import gradio as gr
4
  import time
5
- import Content as con # Import the logic from Content.py
 
6
 
7
- def random_response(message, history):
8
- answer = con.starting(message.lower()) # Call the 'starting' function from Content
9
  for i in range(len(answer)):
10
- time.sleep(0.03) # Simulate a typing effect
11
  yield answer[:i+1]
 
12
 
13
- # Create Gradio Chat Interface
14
- demo = gr.ChatInterface(random_response,
15
- title="Prakriti Analyzer",
16
- description="This bot helps you understand your body constitution or 'prakriti' using ancient Ayurveda principles."
17
- ).queue()
18
-
19
- # Launch Gradio application
20
- demo.launch(inbrowser=True)
 
 
 
1
  import gradio as gr
2
  import time
3
+ import Content as con
4
+
5
 
6
+ def random_response(message,history):
7
+ answer = con.starting(message.lower())
8
  for i in range(len(answer)):
9
+ time.sleep(0.03)
10
  yield answer[:i+1]
11
+
12
 
13
+ demo = gr.ChatInterface(random_response, title= "Prakriti Analyzer", description='This bot is made with love and care to guide you towards a better life by giving you a knowlege about your prakriti or your body costitution.',).queue()
14
+ demo.launch(inbrowser=True)