https://huggingface.co/spaces/Fancellu/Kokoro-TTS-Zero-CPU
To run from docker
docker run -it -p 7860:7860 --platform=linux/amd64 registry.hf.space/fancellu-kokoro-tts-zero-cpu:latest python app.py
import gradio as gr | |
import numpy as np | |
import spaces | |
import torch | |
import random | |
from PIL import Image | |
from diffusers import FluxKontextPipeline | |
from diffusers.utils import load_image |
https://huggingface.co/spaces/Fancellu/Kokoro-TTS-Zero-CPU
To run from docker
docker run -it -p 7860:7860 --platform=linux/amd64 registry.hf.space/fancellu-kokoro-tts-zero-cpu:latest python app.py
https://huggingface.co/spaces/Fancellu/bark-pytorch2.6-compatible
This solves the PyTorch 2.6 breaking change where weights_only=True became the default, causing issues with older model files that contain non-tensor objects, with monkey patch patched_load()
Updated to Python 3.11, latest Gradio, and requirements.txt
If you have a GPU, you can run from Docker Desktop directly
docker run -it -p 7860:7860 --gpus=all --platform=linux/amd64 registry.hf.space/fancellu-bark-pytorch2-6-compatible:latest python app.py
import zio._ | |
import scala.{ Console => SConsole } | |
import scala.io.StdIn | |
import java.io.{ BufferedReader, IOException } | |
import scala.util.Try | |
object InterruptableReadLine extends ZIOAppDefault { | |
def altReadLine(reader: BufferedReader = SConsole.in) = | |
ZIO |
import zio._ | |
object FakeConsoleExample extends ZIOAppDefault { | |
private val program = ZIO.serviceWithZIO[Console] { console => | |
for { | |
_ <- console.printLine("Going to the grocery store") | |
input <- console.readLine("How are you? ") | |
_ <- console.printLine(s"You said: $input") | |
} yield () |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
"unsafe" | |
) |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func greet(st string, done chan bool) { | |
fmt.Println(st) | |
done <- true |
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
// Maps over collection of T and applies function f to each item | |
// Returns a new slice with the transformed items | |
func mapf[T any, U any](items []T, f func(T) U) []U { |
import cats.effect.{IO, IOApp} | |
import fs2.{Stream, text} | |
import fs2.io.file.{Files, Path} | |
import fs2.io.{stdout, stderr} | |
import scala.util.Try | |
object WindowedAverage extends IOApp.Simple: | |
private object Fahrenheit: |
import scala.annotation.targetName | |
import scala.util.boundary | |
import scala.util.boundary.{Label, break} | |
// Works in Scala 3.4.1 | |
def firstIndex[T](xs: List[T], p: T): Int = { | |
boundary: | |
for (x, i) <- xs.zipWithIndex do if (x == p) break(i) | |
-1 |