mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Add upload image in You provider
This commit is contained in:
parent
daf2b6ac3b
commit
331826b003
2 changed files with 3 additions and 1 deletions
|
|
@ -114,7 +114,7 @@
|
|||
<div class="box input-box">
|
||||
<textarea id="message-input" placeholder="Ask a question" cols="30" rows="10"
|
||||
style="white-space: pre-wrap;resize: none;"></textarea>
|
||||
<label for="image" title="Works only with Bing, Gemini and OpenaiChat">
|
||||
<label for="image" title="Works with Bing, Gemini, OpenaiChat and You">
|
||||
<input type="file" id="image" name="image" accept="image/*" required/>
|
||||
<i class="fa-regular fa-image"></i>
|
||||
</label>
|
||||
|
|
@ -161,6 +161,7 @@
|
|||
<option value="Gemini">Gemini</option>
|
||||
<option value="Liaobots">Liaobots</option>
|
||||
<option value="Phind">Phind</option>
|
||||
<option value="You">You</option>
|
||||
<option value="">----</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ class Backend_Api:
|
|||
file = request.files['image']
|
||||
if file.filename != '' and is_allowed_extension(file.filename):
|
||||
kwargs['image'] = to_image(file.stream, file.filename.endswith('.svg'))
|
||||
kwargs['image_name'] = file.filename
|
||||
if "json" in request.form:
|
||||
json_data = json.loads(request.form['json'])
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue