qgyd2021 commited on
Commit
c17b63f
·
verified ·
1 Parent(s): 8772a7e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -2,6 +2,7 @@
2
  # -*- coding: utf-8 -*-
3
  import argparse
4
  import json
 
5
 
6
  import gradio as gr
7
  from langchain.chains.llm import LLMChain
@@ -88,7 +89,10 @@ def main():
88
  title="Awesome ChatGPT Prompts",
89
  description=description,
90
  )
91
- demo.launch()
 
 
 
92
 
93
  return
94
 
 
2
  # -*- coding: utf-8 -*-
3
  import argparse
4
  import json
5
+ import platform
6
 
7
  import gradio as gr
8
  from langchain.chains.llm import LLMChain
 
89
  title="Awesome ChatGPT Prompts",
90
  description=description,
91
  )
92
+ demo.launch(
93
+ server_name="127.0.0.1" if platform.system() == "Windows" else "0.0.0.0",
94
+ server_port=7860
95
+ )
96
 
97
  return
98