Spaces:
Sleeping
Sleeping
JCai
commited on
Commit
•
b023f8e
1
Parent(s):
5630819
try model
Browse files- app.py +1 -1
- watcher.py +2 -2
app.py
CHANGED
@@ -8,7 +8,7 @@ from gradio.themes.base import Base
|
|
8 |
from gradio.themes.utils import colors, fonts, sizes
|
9 |
|
10 |
# Inference client setup
|
11 |
-
client = InferenceClient("
|
12 |
pipe = pipeline("text-generation", "microsoft/Phi-3-mini-4k-instruct", torch_dtype=torch.bfloat16, device_map="auto")
|
13 |
|
14 |
# Global flag to handle cancellation
|
|
|
8 |
from gradio.themes.utils import colors, fonts, sizes
|
9 |
|
10 |
# Inference client setup
|
11 |
+
client = InferenceClient("meta-llama/Llama-2-7b-chat-hf")
|
12 |
pipe = pipeline("text-generation", "microsoft/Phi-3-mini-4k-instruct", torch_dtype=torch.bfloat16, device_map="auto")
|
13 |
|
14 |
# Global flag to handle cancellation
|
watcher.py
CHANGED
@@ -10,7 +10,7 @@ import subprocess
|
|
10 |
load_dotenv()
|
11 |
|
12 |
# Settings
|
13 |
-
VM_IP =
|
14 |
GRADIO_UI_URL = "http://paffenroth-23.dyn.wpi.edu:8005/"
|
15 |
CHECK_INTERVAL = 60 # 60 seconds
|
16 |
RECOVERY_SCRIPT_PATH = 'automated_deployment.sh'
|
@@ -55,7 +55,7 @@ def check_ui_status():
|
|
55 |
print(f"UI returned status code {response.status_code}")
|
56 |
return False
|
57 |
except requests.ConnectionError:
|
58 |
-
print("Failed to connect to UI.")
|
59 |
return False
|
60 |
|
61 |
|
|
|
10 |
load_dotenv()
|
11 |
|
12 |
# Settings
|
13 |
+
VM_IP = os.getenv("MACHINE")
|
14 |
GRADIO_UI_URL = "http://paffenroth-23.dyn.wpi.edu:8005/"
|
15 |
CHECK_INTERVAL = 60 # 60 seconds
|
16 |
RECOVERY_SCRIPT_PATH = 'automated_deployment.sh'
|
|
|
55 |
print(f"UI returned status code {response.status_code}")
|
56 |
return False
|
57 |
except requests.ConnectionError:
|
58 |
+
print(f"{time.ctime()} ---- Failed to connect to UI.")
|
59 |
return False
|
60 |
|
61 |
|