IPF commited on
Commit
e5af20d
·
verified ·
1 Parent(s): 82af899

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -796,7 +796,10 @@ def generate_response(prompt: str, max_new_tokens: int = MAX_NEW_TOKENS) -> str:
796
  """Generate response using vLLM OpenAI-compatible API."""
797
  # Use /completions endpoint for raw prompt
798
  url = f"{REMOTE_API_BASE}/completions"
799
- headers = {"Content-Type": "application/json"}
 
 
 
800
  payload = {
801
  "model": MODEL_NAME,
802
  "prompt": prompt,
 
796
  """Generate response using vLLM OpenAI-compatible API."""
797
  # Use /completions endpoint for raw prompt
798
  url = f"{REMOTE_API_BASE}/completions"
799
+ headers = {
800
+ "Content-Type": "application/json",
801
+ "ngrok-skip-browser-warning": "true", # 绕过 ngrok 免费版的浏览器警告页面
802
+ }
803
  payload = {
804
  "model": MODEL_NAME,
805
  "prompt": prompt,