macadeliccc commited on
Commit
76789b2
1 Parent(s): 74b7d0e
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -8,7 +8,11 @@ import numpy as np
8
 
9
 
10
  # Function to start the ochat server
 
11
  def start_ochat_server():
 
 
 
12
  command = [
13
  "python", "-m", "ochat.serving.openai_api_server",
14
  "--model", "openchat/openchat_3.5"
@@ -23,10 +27,9 @@ def start_ochat_server():
23
 
24
 
25
  # Function to interact with the chat server
26
- @spaces.GPU
27
  def chat_with_ochat(message):
28
- print(f"Is CUDA available: {torch.cuda.is_available()}")
29
- print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
30
  # Here you would add the code to interact with the ochat server
31
  # For simplicity, this is just a placeholder response
32
  return "Response from ochat server"
 
8
 
9
 
10
  # Function to start the ochat server
11
+ @spaces.GPU
12
  def start_ochat_server():
13
+ print(f"Is CUDA available: {torch.cuda.is_available()}")
14
+ print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
15
+
16
  command = [
17
  "python", "-m", "ochat.serving.openai_api_server",
18
  "--model", "openchat/openchat_3.5"
 
27
 
28
 
29
  # Function to interact with the chat server
30
+
31
  def chat_with_ochat(message):
32
+
 
33
  # Here you would add the code to interact with the ochat server
34
  # For simplicity, this is just a placeholder response
35
  return "Response from ochat server"