Spaces:
Running
on
Zero
Running
on
Zero
macadeliccc
commited on
Commit
•
74b7d0e
1
Parent(s):
9c1d271
test
Browse files
app.py
CHANGED
@@ -4,8 +4,7 @@ import torch
|
|
4 |
import subprocess
|
5 |
import numpy as np
|
6 |
|
7 |
-
|
8 |
-
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
9 |
|
10 |
|
11 |
# Function to start the ochat server
|
@@ -26,6 +25,8 @@ def start_ochat_server():
|
|
26 |
# Function to interact with the chat server
|
27 |
@spaces.GPU
|
28 |
def chat_with_ochat(message):
|
|
|
|
|
29 |
# Here you would add the code to interact with the ochat server
|
30 |
# For simplicity, this is just a placeholder response
|
31 |
return "Response from ochat server"
|
@@ -43,4 +44,4 @@ iface = gr.Interface(
|
|
43 |
description="Type your message and get a response from the ochat server."
|
44 |
)
|
45 |
|
46 |
-
iface.launch(
|
|
|
4 |
import subprocess
|
5 |
import numpy as np
|
6 |
|
7 |
+
|
|
|
8 |
|
9 |
|
10 |
# Function to start the ochat server
|
|
|
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"
|
|
|
44 |
description="Type your message and get a response from the ochat server."
|
45 |
)
|
46 |
|
47 |
+
iface.launch()
|