alexliap commited on
Commit
1d4600d
·
unverified ·
1 Parent(s): 2add2e6

add cancel button

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. README.md +0 -1
  3. app.py +2 -6
Dockerfile CHANGED
@@ -17,7 +17,7 @@ COPY . /app
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
  # Expose the Gradio port
20
- EXPOSE 8080
21
 
22
  # Start the Gradio app
23
  CMD ["python", "app.py"]
 
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
  # Expose the Gradio port
20
+ EXPOSE 7860
21
 
22
  # Start the Gradio app
23
  CMD ["python", "app.py"]
README.md CHANGED
@@ -4,7 +4,6 @@ emoji: 💻
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: docker
7
- app_port: 8080
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: docker
 
7
  app_file: app.py
8
  pinned: false
9
  license: mit
app.py CHANGED
@@ -51,10 +51,6 @@ if __name__ == "__main__":
51
  chat_history.append({"role": "assistant", "content": report})
52
  return "", chat_history, format_urls(urls)
53
 
54
- # Chain both: show user → respond with URLs
55
- # msg.submit(show_user_msg, [msg, chatbot], [chatbot], queue=False).then(
56
- # respond, [msg, chatbot], [msg, chatbot, url_display]
57
- # )
58
  msg.submit(
59
  start_new_query, [msg], [msg, chatbot, url_display], queue=False
60
  ).then(
@@ -63,6 +59,6 @@ if __name__ == "__main__":
63
  ], # user message
64
  [msg, chatbot],
65
  [chatbot],
66
- ).then(respond, [msg, chatbot], [msg, chatbot, url_display])
67
 
68
- chat_app.launch(server_name="0.0.0.0", server_port=8080)
 
51
  chat_history.append({"role": "assistant", "content": report})
52
  return "", chat_history, format_urls(urls)
53
 
 
 
 
 
54
  msg.submit(
55
  start_new_query, [msg], [msg, chatbot, url_display], queue=False
56
  ).then(
 
59
  ], # user message
60
  [msg, chatbot],
61
  [chatbot],
62
+ ).then(respond, [msg, chatbot], [msg, chatbot, url_display], queue=True)
63
 
64
+ chat_app.launch(server_name="0.0.0.0")