Spaces:
Running
Running
sukrukirman
commited on
Commit
·
8b0b38b
1
Parent(s):
96b12e8
bug fix
Browse files- app.py +7 -1
- postBuild +0 -13
- requirements.txt +3 -1
app.py
CHANGED
|
@@ -1,5 +1,11 @@
|
|
| 1 |
-
import
|
| 2 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
import json
|
| 4 |
from typing import Any, Dict, Generator
|
| 5 |
from dotenv import load_dotenv
|
|
|
|
| 1 |
+
import sys
|
| 2 |
import os
|
| 3 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 4 |
+
src_path = os.path.join(current_dir, 'src')
|
| 5 |
+
if src_path not in sys.path:
|
| 6 |
+
sys.path.insert(0, src_path)
|
| 7 |
+
|
| 8 |
+
import gradio as gr
|
| 9 |
import json
|
| 10 |
from typing import Any, Dict, Generator
|
| 11 |
from dotenv import load_dotenv
|
postBuild
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env bash
|
| 2 |
-
set -e
|
| 3 |
-
|
| 4 |
-
echo "--- postBuild Başladı (Web Arayüzünden Oluşturuldu) ---"
|
| 5 |
-
echo "Kullanılan Python: $(which python)"
|
| 6 |
-
|
| 7 |
-
echo "--- Adım 1: Temel build araçları (setuptools, wheel) kuruluyor ---"
|
| 8 |
-
python -m pip install setuptools>=61.0 wheel
|
| 9 |
-
|
| 10 |
-
echo "--- Adım 2: Proje ve tüm bağımlılıkları kuruluyor ---"
|
| 11 |
-
python -m pip install '.[transformers]'
|
| 12 |
-
|
| 13 |
-
echo "--- postBuild Başarıyla Tamamlandı. 'moderators' paketi kuruldu. ---"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,3 +1,5 @@
|
|
| 1 |
# Gradio ve .env dosyası için gerekli temel bağımlılıklar
|
| 2 |
gradio
|
| 3 |
-
python-dotenv
|
|
|
|
|
|
|
|
|
| 1 |
# Gradio ve .env dosyası için gerekli temel bağımlılıklar
|
| 2 |
gradio
|
| 3 |
+
python-dotenv
|
| 4 |
+
huggingface-hub>=0.22
|
| 5 |
+
transformers>=4.36
|