This file contains hidden or 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
#r "Newtonsoft.Json" | |
#r "Microsoft.Rest.ClientRuntime.dll" | |
#r "Microsoft.Bot.Connector.Utilities.dll" | |
#r "Microsoft.Bot.Connector.dll" | |
using System.Net; | |
using Microsoft.Bot.Connector; | |
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) | |
{ | |
log.Verbose($"C# HTTP trigger function processed a request. RequestUri={req.RequestUri}"); |
This file contains hidden or 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
#-------------------------- | |
# USER-SPECIFIED DATA | |
#-------------------------- | |
# Tune these parameters | |
num_classes = 2 | |
image_shape = (160, 576) | |
EPOCHS = 40 | |
BATCH_SIZE = 16 |
This file contains hidden or 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
import asyncio | |
from crawl4ai.extraction_strategy import JsonCssExtractionStrategy | |
from crawl4ai import AsyncWebCrawler, CacheMode, CrawlerRunConfig, BrowserConfig | |
import json | |
import os | |
from playwright.async_api import Page, BrowserContext | |
async def before_retrieve_html(page: Page, context: BrowserContext, **kwargs): | |
# Called before final HTML retrieval. | |
print("[HOOK] before_retrieve_html - We can do final actions") |
This file contains hidden or 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
import asyncio | |
import json | |
from crawl4ai import ( | |
AsyncWebCrawler, | |
CacheMode, | |
CrawlerRunConfig, | |
LLMConfig, | |
JsonCssExtractionStrategy, | |
) | |
import time |
This file contains hidden or 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
import asyncio | |
import json | |
from pprint import pprint | |
from crawl4ai import ( | |
AsyncWebCrawler, | |
CrawlerRunConfig, | |
BrowserConfig, | |
JsonCssExtractionStrategy, | |
LLMConfig, | |
) |
This file contains hidden or 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
from crawl4ai import ( | |
CrawlerRunConfig, | |
BrowserConfig, | |
AsyncWebCrawler, | |
JsonCssExtractionStrategy, | |
LLMConfig, | |
) | |
from crawl4ai.utils import preprocess_html_for_schema | |
import asyncio |
This file contains hidden or 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
from crawl4ai import ( | |
CrawlerRunConfig, | |
BrowserConfig, | |
AsyncWebCrawler, | |
DefaultMarkdownGenerator, | |
BM25ContentFilter, | |
) | |
import asyncio | |
from pprint import pprint |