()
| 27 | }; |
| 28 | |
| 29 | const handleSubmit = async () => { |
| 30 | // Replace this URL with the actual API endpoint of your FastAPI backend |
| 31 | const apiUrl = "http://localhost:8000/api/topic-modeling"; |
| 32 | |
| 33 | try { |
| 34 | const response = await fetch(apiUrl, { |
| 35 | method: "POST", |
| 36 | headers: { |
| 37 | "Content-Type": "application/json", |
| 38 | }, |
| 39 | body: JSON.stringify({ |
| 40 | config: "./test_config.yaml", // Update this as needed |
| 41 | repo: repoUrl, |
| 42 | repo_name: "gitmodel", // Update this as needed |
| 43 | openai_secret: openaiSecret, |
| 44 | }), |
| 45 | }); |
| 46 | |
| 47 | const data = await response.json(); |
| 48 | setResults(data); |
| 49 | } catch (error) { |
| 50 | console.error("Error fetching data:", error); |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | return ( |
| 55 | <div className="App"> |
nothing calls this directly
no outgoing calls
no test coverage detected