AngelaKkkkkkkkk commited on
Commit
55e5bce
·
verified ·
1 Parent(s): 6943439

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -1,11 +1,12 @@
1
- import subprocess
 
2
 
3
- # Check if vllm is installed
4
- try:
5
- result = subprocess.run(["pip", "show", "vllm"], capture_output=True, text=True)
6
- if "Name: vllm" in result.stdout:
7
- print("vllm is installed!")
8
- else:
9
- print("vllm is not installed!")
10
- except Exception as e:
11
- print(f"Error checking vllm installation: {e}")
 
1
+ # Load and run the model:
2
+ vllm serve "Tann-dev/sex-chat-dirty-girlfriend"
3
 
4
+ # Call the server using curl:
5
+ curl -X POST "http://localhost:8000/v1/chat/completions" \
6
+ -H "Content-Type: application/json" \
7
+ --data '{
8
+ "model": "Tann-dev/sex-chat-dirty-girlfriend"
9
+ "messages": [
10
+ {"role": "user", "content": "Hello!"}
11
+ ]
12
+ }'