luminoussg commited on
Commit
d82511d
·
verified ·
1 Parent(s): 6733659

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,7 +38,7 @@ def query_model(model_name: str, messages: List[Dict[str, str]]) -> str:
38
  ),
39
  "Qwen2.5-Coder-32B-Instruct": (
40
  f"<|im_start|>system\nTechnical discussion context:\n{conversation}<|im_end|>\n"
41
- "<|im_start|>assistant\nTechnical perspective:"
42
  )
43
  }
44
 
@@ -67,7 +67,7 @@ def query_model(model_name: str, messages: List[Dict[str, str]]) -> str:
67
  result = result.split('<|')[0] # Remove any remaining special tokens
68
  result = result.replace('**', '').replace('##', '') # Remove markdown
69
  result = result.strip() # Remove leading/trailing whitespace
70
- return result.split('\n\n')[0] # Return only first paragraph
71
  except Exception as e:
72
  return f"{model_name} error: {str(e)}"
73
 
 
38
  ),
39
  "Qwen2.5-Coder-32B-Instruct": (
40
  f"<|im_start|>system\nTechnical discussion context:\n{conversation}<|im_end|>\n"
41
+ "<|im_start|>assistant\nTechnical perspective: Let's start implementing the Snake game:\n"
42
  )
43
  }
44
 
 
67
  result = result.split('<|')[0] # Remove any remaining special tokens
68
  result = result.replace('**', '').replace('##', '') # Remove markdown
69
  result = result.strip() # Remove leading/trailing whitespace
70
+ return result # Return complete response
71
  except Exception as e:
72
  return f"{model_name} error: {str(e)}"
73