Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
evaluate_atomic_matching.py
CHANGED
|
@@ -107,7 +107,7 @@ def process_questions(llm_model: str, openai_api_Key: str, deploy_key: str, metr
|
|
| 107 |
|
| 108 |
# Test SSH connection
|
| 109 |
try:
|
| 110 |
-
result = subprocess.run(['ssh', '-T', 'git@github.com'],
|
| 111 |
capture_output=True,
|
| 112 |
text=True)
|
| 113 |
if result.returncode != 1: # GitHub's SSH test always returns 1 when successful
|
|
@@ -120,7 +120,9 @@ def process_questions(llm_model: str, openai_api_Key: str, deploy_key: str, metr
|
|
| 120 |
temp_dir = tempfile.mkdtemp()
|
| 121 |
|
| 122 |
try:
|
| 123 |
-
|
|
|
|
|
|
|
| 124 |
|
| 125 |
# Copy the new file to the cloned repo under atomic_concepts_gradio directory
|
| 126 |
repo_subdir = os.path.join(temp_dir, "atomic_concepts_gradio")
|
|
|
|
| 107 |
|
| 108 |
# Test SSH connection
|
| 109 |
try:
|
| 110 |
+
result = subprocess.run(['ssh', '-T', '-i', key_path, 'git@github.com'],
|
| 111 |
capture_output=True,
|
| 112 |
text=True)
|
| 113 |
if result.returncode != 1: # GitHub's SSH test always returns 1 when successful
|
|
|
|
| 120 |
temp_dir = tempfile.mkdtemp()
|
| 121 |
|
| 122 |
try:
|
| 123 |
+
# Explicitly set the SSH command with the key
|
| 124 |
+
ssh_command = f'ssh -i {key_path}'
|
| 125 |
+
repo = Repo.clone_from(repo_url, temp_dir, env={"GIT_SSH_COMMAND": ssh_command})
|
| 126 |
|
| 127 |
# Copy the new file to the cloned repo under atomic_concepts_gradio directory
|
| 128 |
repo_subdir = os.path.join(temp_dir, "atomic_concepts_gradio")
|