MCPcopy Create free account
hub / github.com/danielpatrickhug/GitModel / handleSubmit

Function handleSubmit

git-frontend/src/App.js:29–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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">

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected