Spaces:
Sleeping
Sleeping
Adam Helmi
commited on
Commit
·
caabf1a
1
Parent(s):
79f4711
Fix api url and network url
Browse files
app.py
CHANGED
@@ -15,7 +15,10 @@ app = FastAPI()
|
|
15 |
origins = [
|
16 |
"http://127.0.0.1:5500", # Your frontend origin (adjust port if needed)
|
17 |
"http://localhost:5500", # Another common frontend origin
|
18 |
-
"https://goblyne.github.io/Jawi-Baru-Transliteration/"
|
|
|
|
|
|
|
19 |
]
|
20 |
|
21 |
# Add CORS middleware
|
|
|
15 |
origins = [
|
16 |
"http://127.0.0.1:5500", # Your frontend origin (adjust port if needed)
|
17 |
"http://localhost:5500", # Another common frontend origin
|
18 |
+
"https://goblyne.github.io/Jawi-Baru-Transliteration/",
|
19 |
+
"http://35.175.72.198:8501",
|
20 |
+
"http://10.27.69.196:8501",
|
21 |
+
"http://localhost:8501",
|
22 |
]
|
23 |
|
24 |
# Add CORS middleware
|
script.js
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
|
14 |
async function translateText(rumiText) {
|
15 |
try {
|
16 |
-
const response = await fetch('
|
17 |
method: 'POST',
|
18 |
headers: {
|
19 |
'Content-Type': 'application/json',
|
|
|
13 |
|
14 |
async function translateText(rumiText) {
|
15 |
try {
|
16 |
+
const response = await fetch('https://huggingface.co/spaces/GobLyne/Jawi-Translation/translate', { // Replace with your FastAPI server URL
|
17 |
method: 'POST',
|
18 |
headers: {
|
19 |
'Content-Type': 'application/json',
|