karthik commited on
Commit
cd574cc
·
verified ·
1 Parent(s): 1a65a97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
  client = InferenceClient(
5
  model="https://qynvq9pllv2plc0v.us-east-1.aws.endpoints.huggingface.cloud"
6
  )
7
-
8
 
9
  def format_prompt(message, history):
10
  prompt = ""
@@ -87,11 +87,15 @@ examples=[["what is self realization according to bhagwan ramana maharishi", Non
87
  ["why don't have the realization of the self like ramana maharishi as a default feature in us , is it not very inefficient for us to realize over the adulthood?", None, None, None, None, None,],
88
  ]
89
 
90
- gr.ChatInterface(
91
- fn=generate,
92
- chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
93
- additional_inputs=additional_inputs,
94
- title="RamanaGPT",
95
- examples=examples,
96
- concurrency_limit=50,
97
- ).launch(show_api=False)
 
 
 
 
 
4
  client = InferenceClient(
5
  model="https://qynvq9pllv2plc0v.us-east-1.aws.endpoints.huggingface.cloud"
6
  )
7
+ image_display = gr.Image('230px-Sri_Ramana_Maharshi_in_1902.jpeg', label='Bhagwan Ramana Maharishi')
8
 
9
  def format_prompt(message, history):
10
  prompt = ""
 
87
  ["why don't have the realization of the self like ramana maharishi as a default feature in us , is it not very inefficient for us to realize over the adulthood?", None, None, None, None, None,],
88
  ]
89
 
90
+ with gr.Blocks() as app:
91
+ image_display
92
+ chat_interface = gr.ChatInterface(
93
+ fn=generate,
94
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
95
+ additional_inputs=additional_inputs,
96
+ title="RamanaGPT",
97
+ examples=examples,
98
+ concurrency_limit=50
99
+ )
100
+
101
+ app.launch(show_api=False)