Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1405,73 +1405,7 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(
|
|
1405 |
outputs=output_to_github
|
1406 |
)
|
1407 |
|
1408 |
-
|
1409 |
-
---
|
1410 |
-
<div style="text-align: center; margin-top: 30px; color: #64748b;">
|
1411 |
-
<h3 style="color: #334155;">🛠️ Quick Start Guide</h3>
|
1412 |
-
|
1413 |
-
<div style="display: flex; justify-content: space-around; margin-top: 20px; flex-wrap: wrap;">
|
1414 |
-
<div style="flex: 1; min-width: 250px; margin: 10px; padding: 20px; background: #f8fafc; border-radius: 10px;">
|
1415 |
-
<h4 style="color: #667eea;">GitHub → HuggingFace</h4>
|
1416 |
-
<p>Deploy any GitHub repository as a HuggingFace Space with automatic LFS handling and optional AI-powered interface generation.</p>
|
1417 |
-
</div>
|
1418 |
-
|
1419 |
-
<div style="flex: 1; min-width: 250px; margin: 10px; padding: 20px; background: #f8fafc; border-radius: 10px;">
|
1420 |
-
<h4 style="color: #667eea;">HuggingFace → GitHub</h4>
|
1421 |
-
<p>Export your HuggingFace Spaces to GitHub for version control, collaboration, and backup.</p>
|
1422 |
-
</div>
|
1423 |
-
</div>
|
1424 |
-
|
1425 |
-
<div style="margin-top: 30px; background: #f1f5f9; padding: 20px; border-radius: 10px;">
|
1426 |
-
<h4 style="color: #334155;">🔐 Authentication Setup</h4>
|
1427 |
-
|
1428 |
-
<div style="text-align: left; max-width: 600px; margin: auto;">
|
1429 |
-
<h5 style="color: #667eea;">For GitHub → HuggingFace:</h5>
|
1430 |
-
<ol style="line-height: 1.8;">
|
1431 |
-
<li>Click "Login with HuggingFace" button above</li>
|
1432 |
-
<li>Authorize the application if prompted</li>
|
1433 |
-
<li>Go to <a href="https://huggingface.co/settings/tokens" target="_blank">Settings → Access Tokens</a></li>
|
1434 |
-
<li>Create a new token with <strong>write</strong> access</li>
|
1435 |
-
<li>Copy and paste the token in the input field</li>
|
1436 |
-
</ol>
|
1437 |
-
|
1438 |
-
<h5 style="color: #667eea; margin-top: 20px;">For HuggingFace → GitHub:</h5>
|
1439 |
-
<ol style="line-height: 1.8;">
|
1440 |
-
<li>Go to <a href="https://github.com/settings/tokens" target="_blank">GitHub Settings → Tokens</a></li>
|
1441 |
-
<li>Generate new token (classic)</li>
|
1442 |
-
<li>Select <code>repo</code> scope</li>
|
1443 |
-
<li>Copy and use in the GitHub export tab</li>
|
1444 |
-
</ol>
|
1445 |
-
</div>
|
1446 |
-
</div>
|
1447 |
-
|
1448 |
-
<div style="margin-top: 20px;">
|
1449 |
-
<h4 style="color: #334155;">Optional API Keys</h4>
|
1450 |
-
<p>
|
1451 |
-
<code style="background: #e2e8f0; padding: 4px 8px; border-radius: 4px;">FIREWORKS_API_KEY</code> - For AI-powered app generation
|
1452 |
-
</p>
|
1453 |
-
</div>
|
1454 |
-
</div>
|
1455 |
-
|
1456 |
-
## README.md Configuration
|
1457 |
-
|
1458 |
-
When deploying to HuggingFace Spaces, the following YAML header will be automatically added to your README.md:
|
1459 |
-
|
1460 |
-
```yaml
|
1461 |
-
---
|
1462 |
-
title: Your Space Title
|
1463 |
-
emoji: 🚀
|
1464 |
-
colorFrom: blue
|
1465 |
-
colorTo: green
|
1466 |
-
sdk: gradio # or streamlit, docker, static
|
1467 |
-
sdk_version: "5.35.0"
|
1468 |
-
app_file: app.py
|
1469 |
-
pinned: false
|
1470 |
-
---
|
1471 |
-
```
|
1472 |
-
|
1473 |
-
This configuration ensures your Space runs correctly on HuggingFace infrastructure.
|
1474 |
-
""")
|
1475 |
|
1476 |
if __name__ == "__main__":
|
1477 |
# OAuth 환경 설정 체크
|
|
|
1405 |
outputs=output_to_github
|
1406 |
)
|
1407 |
|
1408 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1409 |
|
1410 |
if __name__ == "__main__":
|
1411 |
# OAuth 환경 설정 체크
|