Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,7 +87,16 @@ def generate(logo=None, Vtubername=""):
|
|
| 87 |
import requests
|
| 88 |
import os
|
| 89 |
sdkey = os.environ["sdkey"]
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
response = requests.post(
|
| 93 |
f"https://api.stability.ai/v2beta/stable-image/generate/sd3",
|
|
@@ -113,15 +122,6 @@ def generate(logo=None, Vtubername=""):
|
|
| 113 |
title_logo=remove(image)
|
| 114 |
|
| 115 |
|
| 116 |
-
from huggingface_hub import InferenceClient
|
| 117 |
-
|
| 118 |
-
client = InferenceClient(model="mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 119 |
-
|
| 120 |
-
output = client.text_generation("Make this english to Japanese Hiragana. ex. Robert->はろー HuggingFace->はぎんぐふぇいす "+Vtubername+"->",token=HF_TOKEN)
|
| 121 |
-
hiragana = ""
|
| 122 |
-
for char in output:
|
| 123 |
-
if '\u3040' <= char <= '\u309f':
|
| 124 |
-
hiragana += char
|
| 125 |
|
| 126 |
|
| 127 |
|
|
|
|
| 87 |
import requests
|
| 88 |
import os
|
| 89 |
sdkey = os.environ["sdkey"]
|
| 90 |
+
from huggingface_hub import InferenceClient
|
| 91 |
+
|
| 92 |
+
client = InferenceClient(model="mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 93 |
+
|
| 94 |
+
output = client.text_generation("Make this english to Japanese Hiragana. ex. Robert->はろー HuggingFace->はぎんぐふぇいす "+Vtubername+"->")
|
| 95 |
+
hiragana = ""
|
| 96 |
+
for char in output:
|
| 97 |
+
if '\u3040' <= char <= '\u309f':
|
| 98 |
+
hiragana += char
|
| 99 |
+
|
| 100 |
|
| 101 |
response = requests.post(
|
| 102 |
f"https://api.stability.ai/v2beta/stable-image/generate/sd3",
|
|
|
|
| 122 |
title_logo=remove(image)
|
| 123 |
|
| 124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
|
| 127 |
|