-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1436 from ManishMadan2882/main
React Widget: Search bar component
- Loading branch information
Showing
17 changed files
with
842 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Image parser. | ||
Contains parser for .png, .jpg, .jpeg files. | ||
""" | ||
from pathlib import Path | ||
import requests | ||
from typing import Dict, Union | ||
|
||
from application.parser.file.base_parser import BaseParser | ||
|
||
|
||
class ImageParser(BaseParser): | ||
"""Image parser.""" | ||
|
||
def _init_parser(self) -> Dict: | ||
"""Init parser.""" | ||
return {} | ||
|
||
def parse_file(self, file: Path, errors: str = "ignore") -> Union[str, list[str]]: | ||
doc2md_service = "https://llm.arc53.com/doc2md" | ||
# alternatively you can use local vision capable LLM | ||
with open(file, "rb") as file_loaded: | ||
files = {'file': file_loaded} | ||
response = requests.post(doc2md_service, files=files) | ||
data = response.json()["markdown"] | ||
return data |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import React from "react" | ||
import {DocsGPTWidget} from "./components/DocsGPTWidget" | ||
const App = () => { | ||
import {SearchBar} from "./components/SearchBar" | ||
export const App = () => { | ||
return ( | ||
<div> | ||
<SearchBar/> | ||
<DocsGPTWidget/> | ||
</div> | ||
) | ||
} | ||
|
||
export default App | ||
} |
Oops, something went wrong.