Spaces:
Sleeping
Sleeping
Goutham-Vignesh
commited on
Commit
β’
e909eea
1
Parent(s):
ca7efb9
Update app.py
Browse files
app.py
CHANGED
@@ -62,14 +62,14 @@ class ChatWrapper:
|
|
62 |
history = history or []
|
63 |
# If chain is None, that is because no API key was provided.
|
64 |
if chain is None:
|
65 |
-
history.append((inp, "Please paste API key to use
|
66 |
return history, history
|
67 |
|
68 |
# Run chain and append input.
|
69 |
output = chain.predict(input=inp)
|
70 |
history.append((inp, output))
|
71 |
except Exception as e:
|
72 |
-
history.append((inp, "Invalid API key, Please paste Valid API key to use
|
73 |
return history, history
|
74 |
finally:
|
75 |
self.lock.release()
|
@@ -81,7 +81,7 @@ block = gr.Blocks(css=".gradio-container {background-color: lightblue}")
|
|
81 |
|
82 |
with block:
|
83 |
with gr.Row():
|
84 |
-
gr.Markdown("<h3><center> π
|
85 |
|
86 |
openai_api_key_textbox = gr.Textbox(
|
87 |
placeholder="Please paste API key to use ZolBot Bot Agent",
|
@@ -115,11 +115,8 @@ with block:
|
|
115 |
inputs=message,
|
116 |
)
|
117 |
|
118 |
-
gr.HTML("Demo application of a
|
119 |
|
120 |
-
gr.HTML(
|
121 |
-
"<center>Powered by <a href='https://zolvit.com/'>Zolvit π</a></center>"
|
122 |
-
)
|
123 |
|
124 |
state = gr.State()
|
125 |
agent_state = gr.State()
|
|
|
62 |
history = history or []
|
63 |
# If chain is None, that is because no API key was provided.
|
64 |
if chain is None:
|
65 |
+
history.append((inp, "Please paste API key to use T5 Agent"))
|
66 |
return history, history
|
67 |
|
68 |
# Run chain and append input.
|
69 |
output = chain.predict(input=inp)
|
70 |
history.append((inp, output))
|
71 |
except Exception as e:
|
72 |
+
history.append((inp, "Invalid API key, Please paste Valid API key to use T5 Agent"))
|
73 |
return history, history
|
74 |
finally:
|
75 |
self.lock.release()
|
|
|
81 |
|
82 |
with block:
|
83 |
with gr.Row():
|
84 |
+
gr.Markdown("<h3><center> π T5 Conversational Agent π‘</center></h3>")
|
85 |
|
86 |
openai_api_key_textbox = gr.Textbox(
|
87 |
placeholder="Please paste API key to use ZolBot Bot Agent",
|
|
|
115 |
inputs=message,
|
116 |
)
|
117 |
|
118 |
+
gr.HTML("Demo application of a T5 conversational agent π§ ")
|
119 |
|
|
|
|
|
|
|
120 |
|
121 |
state = gr.State()
|
122 |
agent_state = gr.State()
|