mirror of https://github.com/suno-ai/bark.git
Merge 0f6b3305c2
into f4f32d4cd4
commit
f09c1a5093
|
@ -0,0 +1,15 @@
|
|||
from fastapi import FastAPI, HTTPException
|
||||
import requests
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@ app.post("/process-prompt")
|
||||
async def process_prompt(prompt: str):
|
||||
bark_url = "https://api.github.com/repos/username/Bark"
|
||||
headers = {"Accept": "application/vnd.github.v3+json"}
|
||||
|
||||
response = requests.post(bark_url, headers=headers, json={"prompt": prompt})
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
else:
|
||||
raise HTTPException(status_code=500, detail="Failed to process prompt")
|
Loading…
Reference in New Issue