Update app.py
Browse files
app.py
CHANGED
|
@@ -18,4 +18,26 @@ def CustomChatGPT(user_input):
|
|
| 18 |
demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "Web(GPT)3 Daily")
|
| 19 |
|
| 20 |
demo.launch(share=True)
|
| 21 |
-
iface.launch(inline=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "Web(GPT)3 Daily")
|
| 19 |
|
| 20 |
demo.launch(share=True)
|
| 21 |
+
iface.launch(inline=False)
|
| 22 |
+
|
| 23 |
+
if self.share:
|
| 24 |
+
if self.is_space:
|
| 25 |
+
raise RuntimeError("Share is not supported when you are in Spaces")
|
| 26 |
+
try:
|
| 27 |
+
if self.share_url is None:
|
| 28 |
+
self.share_url = networking.setup_tunnel(
|
| 29 |
+
self.server_name, self.server_port
|
| 30 |
+
)
|
| 31 |
+
print(strings.en["SHARE_LINK_DISPLAY"].format(self.share_url))
|
| 32 |
+
if not (quiet):
|
| 33 |
+
print('[32m\u2714 Connected')
|
| 34 |
+
except RuntimeError:
|
| 35 |
+
if self.analytics_enabled:
|
| 36 |
+
utils.error_analytics(self.ip_address, "Not able to set up tunnel")
|
| 37 |
+
self.share_url = None
|
| 38 |
+
self.share = False
|
| 39 |
+
print(strings.en["COULD_NOT_GET_SHARE_LINK"])
|
| 40 |
+
else:
|
| 41 |
+
if not (quiet):
|
| 42 |
+
print('[32m\u2714 Connected')
|
| 43 |
+
self.share_url = None
|