nikhmr1235 commited on
Commit
60bbf45
·
verified ·
1 Parent(s): 95ba3b6

let the app choose os.environ["GRADIO_SERVER_PORT"] = "7861-7870"

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -12,9 +12,12 @@ from langchain_core.output_parsers import StrOutputParser
12
  import tempfile
13
  import nest_asyncio
14
 
 
 
15
  # Apply nest_asyncio
16
  nest_asyncio.apply()
17
 
 
18
  # Constants
19
  LLM_MODEL = "gemini-1.5-flash"
20
  EMBEDDING_MODEL = "BAAI/bge-large-en-v1.5"
@@ -153,4 +156,4 @@ with gr.Blocks(title="PDF Chatbot") as demo:
153
  outputs=[chat_row, file_upload_input]
154
  )
155
 
156
- demo.launch(server_port=7861)
 
12
  import tempfile
13
  import nest_asyncio
14
 
15
+ os.environ["GRADIO_SERVER_PORT"] = "7861-7870"
16
+
17
  # Apply nest_asyncio
18
  nest_asyncio.apply()
19
 
20
+
21
  # Constants
22
  LLM_MODEL = "gemini-1.5-flash"
23
  EMBEDDING_MODEL = "BAAI/bge-large-en-v1.5"
 
156
  outputs=[chat_row, file_upload_input]
157
  )
158
 
159
+ demo.launch()